Spaces:
Running
Running
Hook proceed button to gallery's event listener
Browse files
app.py
CHANGED
@@ -76,6 +76,7 @@ def get_selected_index(evt: gr.SelectData):
|
|
76 |
"""
|
77 |
Returns the selected image from the object detection output gallery.
|
78 |
"""
|
|
|
79 |
return evt.index
|
80 |
|
81 |
|
@@ -99,6 +100,7 @@ if __name__ == "__main__":
|
|
99 |
|
100 |
with gr.Row():
|
101 |
yolos_selected = gr.Number(label="Selected Image Index")
|
|
|
102 |
|
103 |
with gr.Tab("Inference"):
|
104 |
with gr.Row():
|
|
|
76 |
"""
|
77 |
Returns the selected image from the object detection output gallery.
|
78 |
"""
|
79 |
+
proceed_button.interactive = evt.index is not None
|
80 |
return evt.index
|
81 |
|
82 |
|
|
|
100 |
|
101 |
with gr.Row():
|
102 |
yolos_selected = gr.Number(label="Selected Image Index")
|
103 |
+
proceed_button = gr.Button("To Moondream", interactive=False)
|
104 |
|
105 |
with gr.Tab("Inference"):
|
106 |
with gr.Row():
|