Spaces:
Sleeping
Sleeping
Commit
·
f22a3d3
1
Parent(s):
cf64810
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ with gr.Blocks() as demo:
|
|
78 |
o2 = gr.Textbox(label="Similarity score")
|
79 |
title = "Cliping and Cropping"
|
80 |
description = "<p style= 'color:white'>Extract sections of images from your image by using OpenAI's CLIP and Facebooks Detr implemented on HuggingFace Transformers, if the similarity score is not so much, then please consider the prediction to be void.</p>"
|
81 |
-
examples=[['ex3.jpg', 'black bag', 0.96],['ex2.jpg', 'man in red dress', 0.85]]
|
82 |
article = "<p style= 'color:white; text-align:center;'><a href='https://github.com/Vishnunkumar/clipcrop' target='_blank'>clipcrop</a></p>"
|
83 |
gr.Interface(fn=extract_image, inputs=[i1, i2, i3], outputs=[o1, o2], title=title, description=description, article=article, examples=examples, enable_queue=True)
|
84 |
with gr.Tab("Zero Shot Image Classification"):
|
@@ -86,6 +86,6 @@ with gr.Blocks() as demo:
|
|
86 |
i2 = gr.Textbox(lines=1, label="Comma separated classes", placeholder="Enter your classes separated by ','",)
|
87 |
title = "Zero Shot Image Classification"
|
88 |
description = "<p style= 'color:white'>Use clip models embedding to identify the closest class it belongs form its pretrianed data from the given list</p>"
|
89 |
-
examples=[['
|
90 |
gr.Interface(fn=zero_shot_classification,inputs=[i1,i2],outputs="label",title=title,description="Zero Shot Image classification..")
|
91 |
demo.launch(debug = False)
|
|
|
78 |
o2 = gr.Textbox(label="Similarity score")
|
79 |
title = "Cliping and Cropping"
|
80 |
description = "<p style= 'color:white'>Extract sections of images from your image by using OpenAI's CLIP and Facebooks Detr implemented on HuggingFace Transformers, if the similarity score is not so much, then please consider the prediction to be void.</p>"
|
81 |
+
examples=[['Assets/ex3.jpg', 'black bag', 0.96],['Assets/ex2.jpg', 'man in red dress', 0.85],['Assets/ex1.jpg', 'man in orange dress', 0.7]]
|
82 |
article = "<p style= 'color:white; text-align:center;'><a href='https://github.com/Vishnunkumar/clipcrop' target='_blank'>clipcrop</a></p>"
|
83 |
gr.Interface(fn=extract_image, inputs=[i1, i2, i3], outputs=[o1, o2], title=title, description=description, article=article, examples=examples, enable_queue=True)
|
84 |
with gr.Tab("Zero Shot Image Classification"):
|
|
|
86 |
i2 = gr.Textbox(lines=1, label="Comma separated classes", placeholder="Enter your classes separated by ','",)
|
87 |
title = "Zero Shot Image Classification"
|
88 |
description = "<p style= 'color:white'>Use clip models embedding to identify the closest class it belongs form its pretrianed data from the given list</p>"
|
89 |
+
examples=[['Assets/dog.jpg', 'dog,cat,man'],['Assets/cat.jpg','dog,cat,man']]
|
90 |
gr.Interface(fn=zero_shot_classification,inputs=[i1,i2],outputs="label",title=title,description="Zero Shot Image classification..")
|
91 |
demo.launch(debug = False)
|