Commit ·
d041d2b
1
Parent(s): c154927
Refactor Gradio interface layout for submission filtering; enhance search functionality with improved structure and labeling.
Browse files- gradio_interface.py +30 -12
gradio_interface.py
CHANGED
|
@@ -124,18 +124,36 @@ with gr.Blocks(title="🌟ImageCLEFmed-MEDVQA-GI 2025 Submissions 🌟") as demo
|
|
| 124 |
with gr.Tab("View Submissions"):
|
| 125 |
gr.Markdown("### Filter and Search Submissions")
|
| 126 |
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
gr.Markdown(
|
| 141 |
f'''
|
|
|
|
| 124 |
with gr.Tab("View Submissions"):
|
| 125 |
gr.Markdown("### Filter and Search Submissions")
|
| 126 |
|
| 127 |
+
with gr.Row():
|
| 128 |
+
with gr.Column(scale=1):
|
| 129 |
+
task_type_dropdown = gr.Dropdown(
|
| 130 |
+
choices=["all", "task1", "task2"],
|
| 131 |
+
value="all",
|
| 132 |
+
label="Task Type"
|
| 133 |
+
)
|
| 134 |
+
search_box = gr.Textbox(
|
| 135 |
+
label="Search by Username",
|
| 136 |
+
placeholder="Enter username..."
|
| 137 |
+
)
|
| 138 |
+
|
| 139 |
+
with gr.Column(scale=2):
|
| 140 |
+
output_table = gr.Dataframe(
|
| 141 |
+
headers=["User", "Task", "Submitted Time"],
|
| 142 |
+
interactive=False,
|
| 143 |
+
wrap=True,
|
| 144 |
+
label="Submissions"
|
| 145 |
+
)
|
| 146 |
+
|
| 147 |
+
task_type_dropdown.change(
|
| 148 |
+
fn=display_submissions,
|
| 149 |
+
inputs=[task_type_dropdown, search_box],
|
| 150 |
+
outputs=output_table
|
| 151 |
+
)
|
| 152 |
+
search_box.change(
|
| 153 |
+
fn=display_submissions,
|
| 154 |
+
inputs=[task_type_dropdown, search_box],
|
| 155 |
+
outputs=output_table
|
| 156 |
+
)
|
| 157 |
|
| 158 |
gr.Markdown(
|
| 159 |
f'''
|