Abhishek Thakur
commited on
Commit
·
f6da064
1
Parent(s):
e259132
add gradio
Browse files- competitions/create.py +22 -15
- requirements.txt +1 -0
competitions/create.py
CHANGED
|
@@ -292,21 +292,28 @@ def main():
|
|
| 292 |
organization = gr.Dropdown(label="Organization name", choices=[""])
|
| 293 |
competition_name = gr.Textbox(label="Competition name", lines=1)
|
| 294 |
competition_logo = gr.Textbox(label="Competition logo", value="https://mysite.com/mylogo.png", lines=1)
|
| 295 |
-
with gr.
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 310 |
|
| 311 |
output_md = gr.Markdown("Click the button below to create the competition")
|
| 312 |
create_competition = gr.Button(value="Create competition")
|
|
|
|
| 292 |
organization = gr.Dropdown(label="Organization name", choices=[""])
|
| 293 |
competition_name = gr.Textbox(label="Competition name", lines=1)
|
| 294 |
competition_logo = gr.Textbox(label="Competition logo", value="https://mysite.com/mylogo.png", lines=1)
|
| 295 |
+
with gr.Group():
|
| 296 |
+
with gr.Row():
|
| 297 |
+
hardware = gr.Dropdown(label="Hardware to use", choices=HARDWARE_CHOICES, value=HARDWARE_CHOICES[0])
|
| 298 |
+
competition_type = gr.Dropdown(
|
| 299 |
+
label="Competition type", choices=["generic", "script"], value="generic"
|
| 300 |
+
)
|
| 301 |
+
time_limit = gr.Textbox(
|
| 302 |
+
label="Time limit (s). Only used for script competitions", lines=1, value="3600"
|
| 303 |
+
)
|
| 304 |
+
with gr.Row():
|
| 305 |
+
metric = gr.Dropdown(label="Metric to use", choices=METRIC_CHOICES, value=METRIC_CHOICES[0])
|
| 306 |
+
metric_higher_is_better = gr.Dropdown(
|
| 307 |
+
label="Is higher metric better?", choices=[True, False], value=True
|
| 308 |
+
)
|
| 309 |
+
with gr.Row():
|
| 310 |
+
submission_limit = gr.Textbox(label="Submission limit per day", lines=1, value="5")
|
| 311 |
+
selection_limit = gr.Textbox(label="Final selection limit", lines=1, value="2")
|
| 312 |
+
end_date = gr.Textbox(label="End date (YYYY-MM-DD)", lines=1, value="2024-12-31")
|
| 313 |
+
with gr.Row():
|
| 314 |
+
submission_id_column = gr.Textbox(label="Submission id column", lines=1, value="id")
|
| 315 |
+
submission_columns = gr.Textbox(label="Submission columns", lines=1, value="id,pred")
|
| 316 |
+
submission_rows = gr.Textbox(label="Submission total rows (exclusing header)", lines=1, value="10000")
|
| 317 |
|
| 318 |
output_md = gr.Markdown("Click the button below to create the competition")
|
| 319 |
create_competition = gr.Button(value="Create competition")
|
requirements.txt
CHANGED
|
@@ -11,6 +11,7 @@ python-multipart==0.0.6
|
|
| 11 |
uvicorn==0.22.0
|
| 12 |
py7zr==0.20.6
|
| 13 |
pydantic==2.5.3
|
|
|
|
| 14 |
hf-transfer
|
| 15 |
# machine learning libs
|
| 16 |
scikit-learn==1.3.2
|
|
|
|
| 11 |
uvicorn==0.22.0
|
| 12 |
py7zr==0.20.6
|
| 13 |
pydantic==2.5.3
|
| 14 |
+
gradio==4.15.0
|
| 15 |
hf-transfer
|
| 16 |
# machine learning libs
|
| 17 |
scikit-learn==1.3.2
|