kgemera commited on
Commit
8209ae5
·
verified ·
1 Parent(s): aa253a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
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="Input text"),
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.Textbox(label="Batch texts (comma separated)"),
36
- outputs=gr.Textbox(label="Predictions (comma separated)")
 
 
 
 
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