kushagra124 commited on
Commit
4f4dd22
1 Parent(s): 7c1b1e5

adding text box

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -90,10 +90,13 @@ 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
  with gr.Column():
94
  outputs = gr.Image(type="numpy", label="Detected Objects with Selected Category")
95
- labels.submit(add_text, inputs=[labels])
96
- button.click(shot,inputt,labels)
 
97
 
98
 
99
  demo.launch()
 
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
 
102
  demo.launch()