Spaces:
Sleeping
Sleeping
Commit
·
ec9383f
1
Parent(s):
5c16577
Update app.py
Browse files
app.py
CHANGED
@@ -156,9 +156,14 @@ with gr.Blocks() as interface:
|
|
156 |
|
157 |
result_output = gr.HTML()
|
158 |
|
159 |
-
#
|
|
|
|
|
|
|
160 |
choose_resolution.change(fn=update_taxonomic_level_interface, inputs=choose_resolution, outputs=taxonomic_level)
|
161 |
-
|
|
|
|
|
162 |
|
163 |
# Launch the Gradio interface
|
164 |
interface.launch()
|
|
|
156 |
|
157 |
result_output = gr.HTML()
|
158 |
|
159 |
+
# Add a button to submit the image for prediction
|
160 |
+
predict_button = gr.Button("Predict")
|
161 |
+
|
162 |
+
# Bind the dynamic dropdown control
|
163 |
choose_resolution.change(fn=update_taxonomic_level_interface, inputs=choose_resolution, outputs=taxonomic_level)
|
164 |
+
|
165 |
+
# Bind the button click to the prediction function
|
166 |
+
predict_button.click(fn=make_prediction, inputs=[image_input, choose_resolution, taxonomic_level], outputs=result_output)
|
167 |
|
168 |
# Launch the Gradio interface
|
169 |
interface.launch()
|