kushagra124 commited on
Commit
58ed3f4
1 Parent(s): 3a7a0e5

adding example

Browse files
Files changed (3) hide show
  1. app.py +2 -2
  2. images/city_road.jpg +0 -0
  3. images/image2.png +0 -0
app.py CHANGED
@@ -66,7 +66,7 @@ def visualize_images(image,detections,prompt):
66
 
67
 
68
  def shot(image, labels_text,selected_categoty):
69
- prompts = labels_text.split(',')
70
  model_detections = detect_using_clip(image,prompts=prompts)
71
  category_image = visualize_images(image=image,detections=model_detections,prompt=selected_categoty)
72
  return category_image
@@ -78,7 +78,7 @@ iface = gr.Interface(fn=shot,
78
  title = "Zero-shot Image Classification with Prompt ",
79
  examples=[
80
  ["images/room.jpg","bed,table,plant",'plant'],
81
- ["images/city_road.jpg","banner,building facade,door","door"]
82
  ],
83
  # allow_flagging=False,
84
  # analytics_enabled=False,
 
66
 
67
 
68
  def shot(image, labels_text,selected_categoty):
69
+ prompts = labels_text.strip().split(',')
70
  model_detections = detect_using_clip(image,prompts=prompts)
71
  category_image = visualize_images(image=image,detections=model_detections,prompt=selected_categoty)
72
  return category_image
 
78
  title = "Zero-shot Image Classification with Prompt ",
79
  examples=[
80
  ["images/room.jpg","bed,table,plant",'plant'],
81
+ ["images/image2.png","banner,building facade,door","door"]
82
  ],
83
  # allow_flagging=False,
84
  # analytics_enabled=False,
images/city_road.jpg DELETED
Binary file (570 kB)
 
images/image2.png ADDED