File size: 1,544 Bytes
a62bbf7 cb23aba a62bbf7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import gradio as gr
def create_top_section(visible):
with gr.Row() as image_row:
with gr.Column(scale=1, min_width="50px"):
img1 = gr.Image(value='app/assets/van.png', show_download_button=False, show_label=False)
button_collision = gr.Button("Collision with a means of transport", visible=visible)
with gr.Column(scale=1, min_width="50px"):
img2 = gr.Image(value='app/assets/destruction.png', show_download_button=False, show_label=False)
button_deliberate_destruction = gr.Button("Destruction / Deliberatly removed", visible=visible)
#with gr.Row():
with gr.Column(scale=1, min_width="50px"):
img3 = gr.Image(value='app/assets/indirect.png', show_download_button=False, show_label=False)
button_indirect_destruction = gr.Button("Indirect destruction", visible=visible)
with gr.Column(scale=1, min_width="50px"):
img4 = gr.Image(value='app/assets/natural.png', show_download_button=False, show_label=False)
button_natural_cause = gr.Button("Natural cause", visible=visible)
return image_row, button_collision, button_deliberate_destruction, button_indirect_destruction, button_natural_cause
def create_dropdown(visible):
print(visible)
with gr.Row() as dropdown_row:
dropdown = gr.Dropdown(choices=[], label="Dropdown", interactive=True, visible=visible)
return dropdown_row, dropdown
|