Spaces:
Build error
Build error
add description
Browse files
app.py
CHANGED
@@ -151,6 +151,11 @@ def inference(query, labels, n_supp=10,
|
|
151 |
#print(output)
|
152 |
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
gr.Interface(fn=inference,
|
155 |
inputs=[
|
156 |
gr.inputs.Image(label="Image to classify", type="pil"),
|
@@ -166,4 +171,7 @@ gr.Interface(fn=inference,
|
|
166 |
gr.outputs.Label(label="Predicted class probabilities"),
|
167 |
gr.outputs.Image(type='plot', label="Support examples from Google image search"),
|
168 |
],
|
169 |
-
|
|
|
|
|
|
|
|
151 |
#print(output)
|
152 |
|
153 |
|
154 |
+
title = "P>M>F few-shot learning pipeline with Google Image Search (GIS)"
|
155 |
+
description = "Short description: We take a ViT-small backbone, which is pre-trained with DINO, and meta-trained on Meta-Dataset; for few-shot classification, we use a ProtoNet classifier. The demo can be viewed as zero-shot since the support set is built by searching images from Google. Note that you may need to play with GIS parameters to get good support examples. Besides, GIS is not very stable as search requests may fail for many reasons (e.g., number of requests reaches the limit of the day)."
|
156 |
+
article = "<p style='text-align: center'><a href='http://arxiv.org/abs/2204.07305' target='_blank'>Arxiv</a></p>"
|
157 |
+
|
158 |
+
|
159 |
gr.Interface(fn=inference,
|
160 |
inputs=[
|
161 |
gr.inputs.Image(label="Image to classify", type="pil"),
|
|
|
171 |
gr.outputs.Label(label="Predicted class probabilities"),
|
172 |
gr.outputs.Image(type='plot', label="Support examples from Google image search"),
|
173 |
],
|
174 |
+
title=title,
|
175 |
+
description=description,
|
176 |
+
article=article,
|
177 |
+
).launch(debug=True)
|