Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ labels = ['Sadness', 'Joy', 'Love', 'Anger', 'Fear', 'Surprise']
|
|
| 12 |
def predict(text):
|
| 13 |
#img = PILImage.create(img)
|
| 14 |
pred,pred_idx,probs = learner.predict(text)
|
| 15 |
-
return pred
|
| 16 |
|
| 17 |
# Creamos la interfaz y la lanzamos.
|
| 18 |
gr.Interface(fn=predict, inputs=gr.inputs.Textbox(), outputs=gr.outputs.Label()).launch(share=False)
|
|
|
|
| 12 |
def predict(text):
|
| 13 |
#img = PILImage.create(img)
|
| 14 |
pred,pred_idx,probs = learner.predict(text)
|
| 15 |
+
return labels[pred]
|
| 16 |
|
| 17 |
# Creamos la interfaz y la lanzamos.
|
| 18 |
gr.Interface(fn=predict, inputs=gr.inputs.Textbox(), outputs=gr.outputs.Label()).launch(share=False)
|