sergeyfeldman commited on
Commit
46bb59f
·
1 Parent(s): 6d53da0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ all_label_names = list(model.config.id2label.values())
12
 
13
 
14
  def predict(text):
15
- probs = expit(model(**tokenizer([texts], return_tensors="pt", padding=True)).logits.detach().numpy())
16
  return {i: np.round(j, 2) for i, j in zip(all_label_names, probs[0])}
17
 
18
  iface = gr.Interface(
 
12
 
13
 
14
  def predict(text):
15
+ probs = expit(model(**tokenizer([text], return_tensors="pt", padding=True)).logits.detach().numpy())
16
  return {i: np.round(j, 2) for i, j in zip(all_label_names, probs[0])}
17
 
18
  iface = gr.Interface(