Update app.py
Browse files
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 |
-
|
61 |
-
|
62 |
-
|
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=
|
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()
|