Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def predict_single(text):
|
|
| 22 |
|
| 23 |
single_interface = gr.Interface(
|
| 24 |
fn=predict_single,
|
| 25 |
-
inputs=gr.Textbox(label="
|
| 26 |
outputs=gr.Textbox(label="Predicted category")
|
| 27 |
)
|
| 28 |
|
|
@@ -32,8 +32,12 @@ def predict_batch(texts):
|
|
| 32 |
|
| 33 |
batch_interface = gr.Interface(
|
| 34 |
fn=predict_batch,
|
| 35 |
-
inputs=gr.
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
)
|
| 38 |
|
| 39 |
# Lanzar ambos
|
|
|
|
| 22 |
|
| 23 |
single_interface = gr.Interface(
|
| 24 |
fn=predict_single,
|
| 25 |
+
inputs=[gr.Textbox(label="Title"), gr.Textbox(label="Abstract")],
|
| 26 |
outputs=gr.Textbox(label="Predicted category")
|
| 27 |
)
|
| 28 |
|
|
|
|
| 32 |
|
| 33 |
batch_interface = gr.Interface(
|
| 34 |
fn=predict_batch,
|
| 35 |
+
inputs=gr.Dataframe(
|
| 36 |
+
headers=["title", "abstract"],
|
| 37 |
+
label="Batch data",
|
| 38 |
+
row_count=3
|
| 39 |
+
),
|
| 40 |
+
outputs=gr.Textbox(label="Predictions")
|
| 41 |
)
|
| 42 |
|
| 43 |
# Lanzar ambos
|