Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
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 |
|