Spaces:
Running
Running
kushagra124
commited on
Commit
•
362218f
1
Parent(s):
be8d3e7
image addded
Browse files- app.py +2 -2
- images/image2.png +0 -0
app.py
CHANGED
@@ -68,7 +68,7 @@ def visualize_images(image,detections,prompt):
|
|
68 |
def shot(image, labels_text,selected_categoty):
|
69 |
prompts = labels_text.split(',')
|
70 |
prompts = list(map(lambda x: x.strip(),prompts))
|
71 |
-
|
72 |
model_detections = detect_using_clip(image,prompts=prompts)
|
73 |
category_image = visualize_images(image=image,detections=model_detections,prompt=selected_categoty)
|
74 |
return category_image
|
@@ -79,7 +79,7 @@ iface = gr.Interface(fn=shot,
|
|
79 |
description ="Add an Image and list of category to be detected separated by commas",
|
80 |
title = "Zero-shot Image Classification with Prompt ",
|
81 |
examples=[
|
82 |
-
["images/room.jpg","bed,table,plant",'plant'],
|
83 |
["images/image2.png","banner,building facade,door","door"]
|
84 |
],
|
85 |
# allow_flagging=False,
|
|
|
68 |
def shot(image, labels_text,selected_categoty):
|
69 |
prompts = labels_text.split(',')
|
70 |
prompts = list(map(lambda x: x.strip(),prompts))
|
71 |
+
|
72 |
model_detections = detect_using_clip(image,prompts=prompts)
|
73 |
category_image = visualize_images(image=image,detections=model_detections,prompt=selected_categoty)
|
74 |
return category_image
|
|
|
79 |
description ="Add an Image and list of category to be detected separated by commas",
|
80 |
title = "Zero-shot Image Classification with Prompt ",
|
81 |
examples=[
|
82 |
+
["images/room.jpg","bed, table, plant, light, window",'plant'],
|
83 |
["images/image2.png","banner,building facade,door","door"]
|
84 |
],
|
85 |
# allow_flagging=False,
|
images/image2.png
CHANGED