Spaces:
Runtime error
Runtime error
Add more instructions
Browse files
app.py
CHANGED
|
@@ -65,7 +65,16 @@ def zero_shot_multimodal(image, text, options):
|
|
| 65 |
return {label: probs[idx].item() for idx, label in enumerate(options)}
|
| 66 |
|
| 67 |
with demo:
|
| 68 |
-
gr.Markdown(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
with gr.Tabs():
|
| 70 |
with gr.TabItem("Zero-Shot Text Classification"):
|
| 71 |
with gr.Row():
|
|
|
|
| 65 |
return {label: probs[idx].item() for idx, label in enumerate(options)}
|
| 66 |
|
| 67 |
with demo:
|
| 68 |
+
gr.Markdown(
|
| 69 |
+
"""
|
| 70 |
+
# Zero-Shot image, text or multimodal classification using the same FLAVA model
|
| 71 |
+
|
| 72 |
+
Click on one the examples provided to load them into the UI and "Classify".
|
| 73 |
+
|
| 74 |
+
- For text and multimodal classification, provide your 1) prompt with the word you want to be filled in as `[MASK]`, and 2) possible options to be ranked separated by `;`.
|
| 75 |
+
- For image classification, provide class options to be ranked separated by `;`.
|
| 76 |
+
"""
|
| 77 |
+
)
|
| 78 |
with gr.Tabs():
|
| 79 |
with gr.TabItem("Zero-Shot Text Classification"):
|
| 80 |
with gr.Row():
|