belyakoff commited on
Commit
c172233
·
verified ·
1 Parent(s): 84ffbea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -13,12 +13,13 @@ def classify(text, labels):
13
  with gr.Blocks() as demo:
14
  gr.Markdown("## Zero-Shot Text Classification")
15
 
16
- text_input = gr.Textbox(label="Text for classification")
17
- labels_input = gr.Textbox(label="Classes (comma separated)")
18
-
19
- output = gr.Dataframe(headers=["Class", "Probability"], label="Classification Results")
20
-
21
- button = gr.Button("Classify")
 
22
 
23
  button.click(classify, inputs=[text_input, labels_input], outputs=output)
24
 
 
13
  with gr.Blocks() as demo:
14
  gr.Markdown("## Zero-Shot Text Classification")
15
 
16
+ with gr.Row():
17
+ with gr.Column(scale=1):
18
+ text_input = gr.Textbox(label="Text for classification", placeholder="Enter text here...")
19
+ labels_input = gr.Textbox(label="Classes (comma separated)", placeholder="Enter classes separated by commas...")
20
+ button = gr.Button("Classify")
21
+ with gr.Column(scale=2):
22
+ output = gr.Dataframe(headers=["Class", "Probability"], label="Classification Results")
23
 
24
  button.click(classify, inputs=[text_input, labels_input], outputs=output)
25