Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ inputs = [
|
|
20 |
label="Prompt Template Prompt",
|
21 |
placeholder="Optional prompt template as prefix",
|
22 |
value=""),
|
23 |
-
gr.Textbox(lines=1,
|
24 |
-
|
25 |
gr.Textbox(lines=1,
|
26 |
label="Candidate Labels", placeholder="Add a class label, one by one",),
|
27 |
]
|
@@ -37,7 +37,7 @@ def shot(image, labels_text, model_name, hypothesis_template):
|
|
37 |
iface = gr.Interface(shot,
|
38 |
inputs,
|
39 |
"label",
|
40 |
-
examples=[["festival.jpg", "
|
41 |
description="""<p>Chinese CLIP is a contrastive-learning-based vision-language foundation model pretrained on large-scale Chinese data. For more information, please refer to the paper and official github. Also, Chinese CLIP has already been merged into Huggingface Transformers! <br><br>
|
42 |
Paper: <a href='https://arxiv.org/pdf/2403.02714'>https://arxiv.org/pdf/2403.02714</a> <br>
|
43 |
To begin with the demo, provide a picture (either upload manually, or select from the given examples) and add class labels one by one. Optionally, you can also add template as a prefix to the class labels. <br>""",
|
|
|
20 |
label="Prompt Template Prompt",
|
21 |
placeholder="Optional prompt template as prefix",
|
22 |
value=""),
|
23 |
+
# gr.Textbox(lines=1,
|
24 |
+
# label="Prior Domains", placeholder="Add a domain label, one by one",),
|
25 |
gr.Textbox(lines=1,
|
26 |
label="Candidate Labels", placeholder="Add a class label, one by one",),
|
27 |
]
|
|
|
37 |
iface = gr.Interface(shot,
|
38 |
inputs,
|
39 |
"label",
|
40 |
+
examples=[["festival.jpg", "ViT/B-16", "a photo of a {}", "lantern, firecracker, couplet"]],
|
41 |
description="""<p>Chinese CLIP is a contrastive-learning-based vision-language foundation model pretrained on large-scale Chinese data. For more information, please refer to the paper and official github. Also, Chinese CLIP has already been merged into Huggingface Transformers! <br><br>
|
42 |
Paper: <a href='https://arxiv.org/pdf/2403.02714'>https://arxiv.org/pdf/2403.02714</a> <br>
|
43 |
To begin with the demo, provide a picture (either upload manually, or select from the given examples) and add class labels one by one. Optionally, you can also add template as a prefix to the class labels. <br>""",
|