kushagra124 commited on
Commit
94299ff
1 Parent(s): 4f4dd22

adding text box

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -61,6 +61,7 @@ def display_images(image,detections,prompt='traffic light'):
61
 
62
 
63
  def shot(image, labels_text):
 
64
  prompts = labels_text.split(',')
65
  global classes
66
  classes = prompts
@@ -90,12 +91,11 @@ with gr.Blocks(title="Zero Shot Object ddetection using Text Prompts") as demo :
90
  inputt = gr.Image(type="numpy", label="Input Image for Classification")
91
  labels = gr.Textbox(label="Enter Label/ labels",placeholder="ex. car,person",scale=4)
92
  button = gr.Button(value="Locate objects")
93
- print(labels)
94
- dropdown = gr.Dropdown(labels,label="Select the category",info='Label selection panel')
95
  with gr.Column():
96
  outputs = gr.Image(type="numpy", label="Detected Objects with Selected Category")
 
97
 
98
- labels.submit(add_text, inputs=[labels],outputs=labels)
99
  button.click(fn=shot,inputs=[inputt,labels],api_name='Get labels')
100
 
101
 
 
61
 
62
 
63
  def shot(image, labels_text):
64
+ print(labels_text)
65
  prompts = labels_text.split(',')
66
  global classes
67
  classes = prompts
 
91
  inputt = gr.Image(type="numpy", label="Input Image for Classification")
92
  labels = gr.Textbox(label="Enter Label/ labels",placeholder="ex. car,person",scale=4)
93
  button = gr.Button(value="Locate objects")
 
 
94
  with gr.Column():
95
  outputs = gr.Image(type="numpy", label="Detected Objects with Selected Category")
96
+ # dropdown = gr.Dropdown(labels,label="Select the category",info='Label selection panel')
97
 
98
+ # labels.submit(add_text, inputs=labels)
99
  button.click(fn=shot,inputs=[inputt,labels],api_name='Get labels')
100
 
101