muzairkhattak
commited on
Commit
·
b063f78
1
Parent(s):
ad2cd02
minor fix
Browse files
app.py
CHANGED
@@ -83,14 +83,14 @@ pipes = {
|
|
83 |
}
|
84 |
# Define Gradio inputs and outputs
|
85 |
inputs = [
|
86 |
-
gr.Image(type="pil", label="Image"),
|
87 |
-
gr.Textbox(label="Candidate Labels (comma-separated)"),
|
88 |
-
gr.Radio(
|
89 |
choices=["ViT/B-16", "ViT/L-14@336px-base-text"],
|
90 |
label="Model",
|
91 |
value="ViT/B-16",
|
92 |
),
|
93 |
-
gr.Textbox(label="Prompt Template", placeholder="Optional prompt template as prefix",
|
94 |
value=""),
|
95 |
]
|
96 |
outputs = gr.Label(label="Predicted Scores")
|
@@ -132,4 +132,4 @@ iface = gr.Interface(shot,
|
|
132 |
<b>[DEMO USAGE]</b> To begin with the demo, provide a picture (either upload manually, or select from the given examples) and class labels. Optionally you can also add template as an prefix to the class labels. <br> </p>""",
|
133 |
title="Zero-shot Medical Image Classification with UniMed-CLIP")
|
134 |
|
135 |
-
iface.launch(
|
|
|
83 |
}
|
84 |
# Define Gradio inputs and outputs
|
85 |
inputs = [
|
86 |
+
gr.inputs.Image(type="pil", label="Image"),
|
87 |
+
gr.inputs.Textbox(label="Candidate Labels (comma-separated)"),
|
88 |
+
gr.inputs.Radio(
|
89 |
choices=["ViT/B-16", "ViT/L-14@336px-base-text"],
|
90 |
label="Model",
|
91 |
value="ViT/B-16",
|
92 |
),
|
93 |
+
gr.inputs.Textbox(label="Prompt Template", placeholder="Optional prompt template as prefix",
|
94 |
value=""),
|
95 |
]
|
96 |
outputs = gr.Label(label="Predicted Scores")
|
|
|
132 |
<b>[DEMO USAGE]</b> To begin with the demo, provide a picture (either upload manually, or select from the given examples) and class labels. Optionally you can also add template as an prefix to the class labels. <br> </p>""",
|
133 |
title="Zero-shot Medical Image Classification with UniMed-CLIP")
|
134 |
|
135 |
+
iface.launch()
|