SushantGautam commited on
Commit
d041d2b
·
1 Parent(s): c154927

Refactor Gradio interface layout for submission filtering; enhance search functionality with improved structure and labeling.

Browse files
Files changed (1) hide show
  1. 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
- task_type_dropdown = gr.Dropdown(
128
- choices=["all", "task1", "task2"], value="all", label="Task Type")
129
- search_box = gr.Textbox(
130
- label="Search by Username", placeholder="Enter username...")
131
-
132
- output_table = gr.Dataframe(
133
- headers=["User", "Task", "Submitted Time"], interactive=False, value=[])
134
-
135
- task_type_dropdown.change(fn=display_submissions, inputs=[
136
- task_type_dropdown, search_box], outputs=output_table)
137
- search_box.change(fn=display_submissions, inputs=[
138
- task_type_dropdown, search_box], outputs=output_table)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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'''