Bittar commited on
Commit
62519b7
1 Parent(s): 588ff0c

updating predict function

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def predict(text):
18
  outputs = model(**inputs)
19
  predictions = outputs.logits
20
 
21
- return mapping[predictions.argmax()]
22
 
23
  iface = gr.Interface(
24
  fn=predict,
 
18
  outputs = model(**inputs)
19
  predictions = outputs.logits
20
 
21
+ return mapping[predictions.argmax().item()]
22
 
23
  iface = gr.Interface(
24
  fn=predict,