isboudja commited on
Commit
7f586a7
·
verified ·
1 Parent(s): 6fa61ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ labels = learner.dls.vocab
12
 
13
  def predict(text):
14
  pred, pred_idx, probs = learner.predict(text)
15
- return {labels[i]: float(probs[i]) for i in range(len(labels))}
16
 
17
  # Create and launch the Gradio interface for text input
18
  gr.Interface(
 
12
 
13
  def predict(text):
14
  pred, pred_idx, probs = learner.predict(text)
15
+ return {pred: float(probs[1])}
16
 
17
  # Create and launch the Gradio interface for text input
18
  gr.Interface(