Update app.py
Browse files
app.py
CHANGED
@@ -202,6 +202,9 @@ with gr.Blocks() as demo:
|
|
202 |
ROOT = get_tree(imgpath)
|
203 |
print(ROOT.name)
|
204 |
gr.Markdown("## Interactive Tree and Image Display")
|
|
|
|
|
|
|
205 |
with gr.Row():
|
206 |
tree_output = gr.Plot(plot_tree_using_igraph) # Connect the function directly
|
207 |
|
@@ -215,10 +218,10 @@ with gr.Blocks() as demo:
|
|
215 |
dropdown_2_protos = gr.Dropdown(label="Select a prototype ID", choices=[], allow_custom_value=True)
|
216 |
image_output_2 = gr.Image()
|
217 |
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
|
223 |
|
224 |
# Initialize with placeholder images
|
|
|
202 |
ROOT = get_tree(imgpath)
|
203 |
print(ROOT.name)
|
204 |
gr.Markdown("## Interactive Tree and Image Display")
|
205 |
+
# with gr.Row():
|
206 |
+
# dropdown_species = gr.Dropdown(label="Select a species", choices=list(species_to_imgpath.keys()))
|
207 |
+
|
208 |
with gr.Row():
|
209 |
tree_output = gr.Plot(plot_tree_using_igraph) # Connect the function directly
|
210 |
|
|
|
218 |
dropdown_2_protos = gr.Dropdown(label="Select a prototype ID", choices=[], allow_custom_value=True)
|
219 |
image_output_2 = gr.Image()
|
220 |
|
221 |
+
dropdown_1_nodename.change(get_protoIDs, dropdown_1_nodename, dropdown_1_protos)
|
222 |
+
dropdown_1_protos.change(get_image, [dropdown_1_nodename, dropdown_1_protos], image_output_1)
|
223 |
+
dropdown_2_nodename.change(get_protoIDs, dropdown_2_nodename, dropdown_2_protos)
|
224 |
+
dropdown_2_protos.change(get_image, [dropdown_2_nodename, dropdown_2_protos], image_output_2)
|
225 |
|
226 |
|
227 |
# Initialize with placeholder images
|