Spaces:
Running
Running
Commit
Β·
68a1a94
1
Parent(s):
bdf1776
enhance gradio interface with improved user guidance and submission details
Browse files- gradio_interface.py +29 -4
gradio_interface.py
CHANGED
|
@@ -107,12 +107,30 @@ def refresh_page():
|
|
| 107 |
output_table = gr.Dataframe(headers=[
|
| 108 |
"User", "Task", "Submitted Time"], interactive=False, value=[], scale=5,)
|
| 109 |
task_type_dropdown = gr.Dropdown(
|
| 110 |
-
choices=["all", "task1", "task2"],
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
upload_button = gr.File(label="Upload JSON", file_types=["json"])
|
| 113 |
|
| 114 |
# Create a tabbed interface
|
| 115 |
-
with gr.Blocks(title="ImageCLEFmed-MEDVQA-GI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
with gr.Tab("View Submissions"):
|
| 117 |
gr.Markdown("### Submissions Table")
|
| 118 |
gr.Interface(
|
|
@@ -120,8 +138,15 @@ with gr.Blocks(title="ImageCLEFmed-MEDVQA-GI-2025 Submissions") as demo:
|
|
| 120 |
inputs=[task_type_dropdown, search_box],
|
| 121 |
outputs=output_table,
|
| 122 |
title="ImageCLEFmed-MEDVQA-GI-2025 Submissions",
|
| 123 |
-
description="Filter and search submissions by task type and user
|
| 124 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
with gr.Tab("Upload Submission", visible=False):
|
| 126 |
file_input = gr.File(label="Upload JSON", file_types=["json"])
|
| 127 |
upload_output = gr.Textbox(label="Result") # Add this line
|
|
|
|
| 107 |
output_table = gr.Dataframe(headers=[
|
| 108 |
"User", "Task", "Submitted Time"], interactive=False, value=[], scale=5,)
|
| 109 |
task_type_dropdown = gr.Dropdown(
|
| 110 |
+
choices=["all", "task1", "task2"],
|
| 111 |
+
value="all",
|
| 112 |
+
label="Task Type",
|
| 113 |
+
info="Filter submissions by Task 1 (VQA) or Task 2 (Synthetic Image Generation)"
|
| 114 |
+
)
|
| 115 |
+
search_box = gr.Textbox(
|
| 116 |
+
value="",
|
| 117 |
+
label="Search by Username",
|
| 118 |
+
info="Enter a username to filter specific submissions"
|
| 119 |
+
)
|
| 120 |
+
|
| 121 |
upload_button = gr.File(label="Upload JSON", file_types=["json"])
|
| 122 |
|
| 123 |
# Create a tabbed interface
|
| 124 |
+
with gr.Blocks(title="πImageCLEFmed-MEDVQA-GI 2025 Submissions π") as demo:
|
| 125 |
+
# gr.Markdown("""
|
| 126 |
+
# # Welcome to the official submission portal for the [MEDVQA-GI 2025](https://www.imageclef.org/2025/medical/vqa) challenge!
|
| 127 |
+
# - π [Challenge Homepage](https://github.com/simula/ImageCLEFmed-MEDVQA-GI-2025) | [Register for ImageCLEF 2025](https://www.imageclef.org/2025#registration)
|
| 128 |
+
# - π [Submission Insructions](https://github.com/simula/ImageCLEFmed-MEDVQA-GI-2025#-submission-system)
|
| 129 |
+
# """)
|
| 130 |
+
gr.Markdown("""
|
| 131 |
+
# π Welcome to the official submission portal for the [MEDVQA-GI 2025](https://www.imageclef.org/2025/medical/vqa) challenge! π₯π§¬
|
| 132 |
+
### π [**Challenge Homepage** in GitHub](https://github.com/simula/ImageCLEFmed-MEDVQA-GI-2025) | π [**Register** for ImageCLEF 2025](https://www.imageclef.org/2025#registration) | π
[**Competition Schedule**](https://github.com/simula/ImageCLEFmed-MEDVQA-GI-2025#:~:text=Schedule) | π¦ [**Submission Instructions**](https://github.com/simula/ImageCLEFmed-MEDVQA-GI-2025#-submission-system)π₯π₯
|
| 133 |
+
""")
|
| 134 |
with gr.Tab("View Submissions"):
|
| 135 |
gr.Markdown("### Submissions Table")
|
| 136 |
gr.Interface(
|
|
|
|
| 138 |
inputs=[task_type_dropdown, search_box],
|
| 139 |
outputs=output_table,
|
| 140 |
title="ImageCLEFmed-MEDVQA-GI-2025 Submissions",
|
| 141 |
+
description="Filter and search submissions by task type and user:"
|
| 142 |
)
|
| 143 |
+
gr.Markdown(
|
| 144 |
+
f'''
|
| 145 |
+
π Last refreshed: {last_submission_update_time.strftime('%Y-%m-%d %H:%M:%S')} UTC | π Total Submissions: {len(submissions)}
|
| 146 |
+
|
| 147 |
+
π¬ For any questions or issues, [contact the organizers](https://github.com/simula/ImageCLEFmed-MEDVQA-GI-2025#-organizers) or check the documentation in the [GitHub repo](https://github.com/simula/ImageCLEFmed-MEDVQA-GI-2025). Good luck and thank you for contributing to medical AI research! πͺπ€π
|
| 148 |
+
''')
|
| 149 |
+
|
| 150 |
with gr.Tab("Upload Submission", visible=False):
|
| 151 |
file_input = gr.File(label="Upload JSON", file_types=["json"])
|
| 152 |
upload_output = gr.Textbox(label="Result") # Add this line
|