haripriyaram commited on
Commit
92da152
·
verified ·
1 Parent(s): c964f6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ def predict_emotion(text):
12
  vocab = learn.dls.vocab[0] if isinstance(learn.dls.vocab[0], list) else learn.dls.vocab
13
  probs_dict = {label: float(prob) for label, prob in zip(vocab, probs)}
14
 
15
- return pred_label, probs_dict
16
 
17
  # Gradio UI
18
  iface = gr.Interface(
@@ -28,4 +28,4 @@ iface = gr.Interface(
28
  )
29
 
30
  if __name__ == "__main__":
31
- iface.launch()
 
12
  vocab = learn.dls.vocab[0] if isinstance(learn.dls.vocab[0], list) else learn.dls.vocab
13
  probs_dict = {label: float(prob) for label, prob in zip(vocab, probs)}
14
 
15
+ return pred_label #, probs_dict
16
 
17
  # Gradio UI
18
  iface = gr.Interface(
 
28
  )
29
 
30
  if __name__ == "__main__":
31
+ iface.launch(share=True)