Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -178,7 +178,7 @@ print("done")
|
|
178 |
#####################################
|
179 |
#Push to Hub
|
180 |
print("push to hub")
|
181 |
-
login(token=os.environ["HF_WRITE_TOKEN"])
|
182 |
#trainer.push_to_hub("test-tis-1")
|
183 |
#tokenizer.push_to_hub("test-tis-1")????
|
184 |
print("done")
|
@@ -190,8 +190,8 @@ print("done")
|
|
190 |
print("Predict")
|
191 |
login(token=os.environ["HF_ACCESS_TOKEN"])
|
192 |
model_neu = "test-tis-1"
|
193 |
-
|
194 |
-
antwort = predict(model_neu,
|
195 |
temperature=0.8,
|
196 |
max_length_tokens=1024,
|
197 |
max_context_length_tokens=2048,)
|
|
|
178 |
#####################################
|
179 |
#Push to Hub
|
180 |
print("push to hub")
|
181 |
+
#login(token=os.environ["HF_WRITE_TOKEN"])
|
182 |
#trainer.push_to_hub("test-tis-1")
|
183 |
#tokenizer.push_to_hub("test-tis-1")????
|
184 |
print("done")
|
|
|
190 |
print("Predict")
|
191 |
login(token=os.environ["HF_ACCESS_TOKEN"])
|
192 |
model_neu = "test-tis-1"
|
193 |
+
model_neu, device_neu = load_model(model_neu, False)
|
194 |
+
antwort = predict(model_neu, tokenizer, device_neu, "Was ist Tis?", [["Tis", ""]], top_p=5,
|
195 |
temperature=0.8,
|
196 |
max_length_tokens=1024,
|
197 |
max_context_length_tokens=2048,)
|