isboudja commited on
Commit
babf18a
·
verified ·
1 Parent(s): d8ec8cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -12,7 +12,9 @@ labels = learner.dls.vocab
12
 
13
  # Define a function to make predictions
14
  def predict(text):
15
- pred, pred_idx, probs = learner.predict(text)
 
 
16
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
17
 
18
  # Create and launch the Gradio interface
 
12
 
13
  # Define a function to make predictions
14
  def predict(text):
15
+ prediction = learner.predict(text)
16
+ print(prediction)
17
+ pred, pred_idx, probs = prediction[:3]
18
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
19
 
20
  # Create and launch the Gradio interface