Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,8 +26,8 @@ def postprocessing(pred):
|
|
| 26 |
# Definimos una funci贸n que se encarga de llevar a cabo las predicciones
|
| 27 |
def predict(text):
|
| 28 |
#img = PILImage.create(img)
|
| 29 |
-
pred = learner.predict(text)
|
| 30 |
-
return pred
|
| 31 |
|
| 32 |
# Creamos la interfaz y la lanzamos.
|
| 33 |
gr.Interface(fn=predict, inputs=gr.inputs.Textbox(), outputs=gr.outputs.Label(preprocessing_fn=preprocessing)).launch(share=False)
|
|
|
|
| 26 |
# Definimos una funci贸n que se encarga de llevar a cabo las predicciones
|
| 27 |
def predict(text):
|
| 28 |
#img = PILImage.create(img)
|
| 29 |
+
pred,pred_idx,probs = learner.predict(text)
|
| 30 |
+
return pred
|
| 31 |
|
| 32 |
# Creamos la interfaz y la lanzamos.
|
| 33 |
gr.Interface(fn=predict, inputs=gr.inputs.Textbox(), outputs=gr.outputs.Label(preprocessing_fn=preprocessing)).launch(share=False)
|