Spaces:
Build error
Build error
add description
Browse files150 unmodified lines1511521531541551569 unmodified lines166167168169150 unmodified lines#print(output)gr.Interface(fn=inference,inputs=[gr.inputs.Image(label="Image to classify", type="pil"),9 unmodified linesgr.outputs.Label(label="Predicted class probabilities"),gr.outputs.Image(type='plot', label="Support examples from Google image search"),],description="PMF few-shot learning with Google image search").launch(debug=True)150 unmodified lines1511521531541551561571581591601619 unmodified lines171172173174175176177150 unmodified lines#print(output)title = "P>M>F few-shot learning pipeline with Google Image Search (GIS)"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)."article = "<p style='text-align: center'><a href='http://arxiv.org/abs/2204.07305' target='_blank'>Arxiv</a></p>"gr.Interface(fn=inference,inputs=[gr.inputs.Image(label="Image to classify", type="pil"),9 unmodified linesgr.outputs.Label(label="Predicted class probabilities"),gr.outputs.Image(type='plot', label="Support examples from Google image search"),],title=title,description=description,article=article,).launch(debug=True)
app.py+9-1