chrismontes commited on
Commit
d15435c
·
verified ·
1 Parent(s): 74d72ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -57,12 +57,12 @@ def update_dropdown(input_img):
57
  return gr.Dropdown.update(choices=topk_labels, value=topk_labels[0])
58
 
59
  with gr.Blocks() as gradio_app:
60
- with gr.Row():
61
- image_input = gr.Image(label="Please select a clear image of your good dog to upload, or use your camera to take a picture.", sources=['upload', 'webcam'], type="pil")
62
- breed_dropdown = gr.Dropdown(label="Select the breed you think is correct", choices=[], type="value")
63
 
64
  image_input.change(fn=update_dropdown, inputs=image_input, outputs=breed_dropdown)
65
- breed_dropdown.change(fn=get_user_selection, inputs=breed_dropdown, outputs=gr.Textbox(label="Result"))
66
 
67
  if __name__ == "__main__":
68
  gradio_app.launch()
 
57
  return gr.Dropdown.update(choices=topk_labels, value=topk_labels[0])
58
 
59
  with gr.Blocks() as gradio_app:
60
+ image_input = gr.Image(label="Please select a clear image of your good dog to upload, or use your camera to take a picture.", sources=['upload', 'webcam'], type="pil")
61
+ breed_dropdown = gr.Dropdown(label="Select the breed you think is correct", choices=[], type="value")
62
+ result_text = gr.Textbox(label="Result")
63
 
64
  image_input.change(fn=update_dropdown, inputs=image_input, outputs=breed_dropdown)
65
+ breed_dropdown.change(fn=get_user_selection, inputs=breed_dropdown, outputs=result_text)
66
 
67
  if __name__ == "__main__":
68
  gradio_app.launch()