Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,8 @@ categories = ('Negative', 'Positive')
|
|
7 |
label = gr.outputs.Label()
|
8 |
def classify(text):
|
9 |
pred,pred_idx,probs = learn.predict(text)
|
10 |
-
return
|
11 |
|
12 |
|
13 |
-
intf = gr.Interface(classify,"text",label)
|
14 |
intf.launch()
|
|
|
7 |
label = gr.outputs.Label()
|
8 |
def classify(text):
|
9 |
pred,pred_idx,probs = learn.predict(text)
|
10 |
+
return dict(zip(categories, map(float,probs)))
|
11 |
|
12 |
|
13 |
+
intf = gr.Interface(fn=classify,inputs="text",outputs=label)
|
14 |
intf.launch()
|