Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ def predict(txt):
|
|
| 18 |
#pred,pred_idx,probs = learner.predict(txt)
|
| 19 |
#return pred
|
| 20 |
# Modelo de clasificación basados en mecanismos de atención
|
| 21 |
-
return classifier(txt)
|
| 22 |
|
| 23 |
gr.Interface(fn=predict, inputs="text", outputs="text",
|
| 24 |
examples=['the story gives ample opportunity for large-scale action and suspense , which director shekhar kapur supplies with tremendous skill .',
|
|
|
|
| 18 |
#pred,pred_idx,probs = learner.predict(txt)
|
| 19 |
#return pred
|
| 20 |
# Modelo de clasificación basados en mecanismos de atención
|
| 21 |
+
return classifier(txt)[0]['label']
|
| 22 |
|
| 23 |
gr.Interface(fn=predict, inputs="text", outputs="text",
|
| 24 |
examples=['the story gives ample opportunity for large-scale action and suspense , which director shekhar kapur supplies with tremendous skill .',
|