karalif commited on
Commit
db836b5
·
verified ·
1 Parent(s): b68bd8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -23,7 +23,7 @@ bench = Benchmark(model, tokenizer)
23
 
24
  def get_prediction(text):
25
  encoding = tokenizer(text, return_tensors="pt", padding="max_length", truncation=True, max_length=200)
26
- encoding = {k: v.to(new_model.device) for k, v in encoding.items()}
27
 
28
  with torch.no_grad():
29
  outputs = model(**encoding)
 
23
 
24
  def get_prediction(text):
25
  encoding = tokenizer(text, return_tensors="pt", padding="max_length", truncation=True, max_length=200)
26
+ encoding = {k: v.to(model.device) for k, v in encoding.items()}
27
 
28
  with torch.no_grad():
29
  outputs = model(**encoding)