Arman511 commited on
Commit
eaafae6
·
1 Parent(s): d2ea134

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -3,11 +3,12 @@ import gradio as gr
3
 
4
  learn.load_learner('export.pkl')
5
 
6
- categories = ('Negative', 'Positive')
7
  label = gr.outputs.Label()
8
  def classify(text):
9
  pred,pred_idx,probs = learn.predict(text)
10
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
11
 
12
 
13
- intf = gr.Interface(fn=classify,inputs="text", outputs=label).launch(share=True)
 
 
3
 
4
  learn.load_learner('export.pkl')
5
 
6
+ categories = ('Negative', 'Positive')
7
  label = gr.outputs.Label()
8
  def classify(text):
9
  pred,pred_idx,probs = learn.predict(text)
10
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
11
 
12
 
13
+ intf = gr.Interface(classify,"text",label)
14
+ intf.launch()