alexkueck commited on
Commit
99bf252
·
1 Parent(s): 9808c6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- tokenizer_neu,model_neu, device_neu = load_tokenizer_and_model(model_neu, False)
194
- antwort = predict(model_neu, tokenizer_neu, device_neu, "Was ist Tis?", [["Tis", ""]], top_p=5,
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,)