Spaces:
Sleeping
Sleeping
Version
Browse files- app.py +4 -0
- src/submission/submit.py +3 -3
app.py
CHANGED
@@ -152,6 +152,9 @@ with demo:
|
|
152 |
model_name_textbox = gr.Textbox(label="Model name")
|
153 |
revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
154 |
output_format = gr.Textbox(label="Output format", placeholder="Out-GEN")
|
|
|
|
|
|
|
155 |
|
156 |
with gr.Row():
|
157 |
u = gr.UploadButton("Upload a file", file_count="single")
|
@@ -165,6 +168,7 @@ with demo:
|
|
165 |
output_format,
|
166 |
revision_name_textbox,
|
167 |
u,
|
|
|
168 |
],
|
169 |
submission_result,
|
170 |
)
|
|
|
152 |
model_name_textbox = gr.Textbox(label="Model name")
|
153 |
revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
154 |
output_format = gr.Textbox(label="Output format", placeholder="Out-GEN")
|
155 |
+
version = gr.Dropdown(
|
156 |
+
["1_correct", "1_correct_var", "n_correct",], value=["1_correct"], multiselect=False, label="Task version",
|
157 |
+
)
|
158 |
|
159 |
with gr.Row():
|
160 |
u = gr.UploadButton("Upload a file", file_count="single")
|
|
|
168 |
output_format,
|
169 |
revision_name_textbox,
|
170 |
u,
|
171 |
+
version,
|
172 |
],
|
173 |
submission_result,
|
174 |
)
|
src/submission/submit.py
CHANGED
@@ -20,6 +20,7 @@ def add_new_eval(
|
|
20 |
output_format: str,
|
21 |
revision_name: str,
|
22 |
upload_file,
|
|
|
23 |
):
|
24 |
global REQUESTED_MODELS
|
25 |
global USERS_TO_SUBMISSION_DATES
|
@@ -27,8 +28,7 @@ def add_new_eval(
|
|
27 |
REQUESTED_MODELS, USERS_TO_SUBMISSION_DATES = already_submitted_models(EVAL_REQUESTS_PATH)
|
28 |
|
29 |
print(upload_file)
|
30 |
-
|
31 |
-
version = "1_correct"
|
32 |
|
33 |
|
34 |
# Does the model actually exist?
|
@@ -81,7 +81,7 @@ def add_new_eval(
|
|
81 |
path_in_repo=out_path.split("eval-queue/")[1],
|
82 |
repo_id=QUEUE_REPO,
|
83 |
repo_type="dataset",
|
84 |
-
commit_message=f"Add {
|
85 |
)
|
86 |
|
87 |
# Remove the local file
|
|
|
20 |
output_format: str,
|
21 |
revision_name: str,
|
22 |
upload_file,
|
23 |
+
version: str,
|
24 |
):
|
25 |
global REQUESTED_MODELS
|
26 |
global USERS_TO_SUBMISSION_DATES
|
|
|
28 |
REQUESTED_MODELS, USERS_TO_SUBMISSION_DATES = already_submitted_models(EVAL_REQUESTS_PATH)
|
29 |
|
30 |
print(upload_file)
|
31 |
+
print(version)
|
|
|
32 |
|
33 |
|
34 |
# Does the model actually exist?
|
|
|
81 |
path_in_repo=out_path.split("eval-queue/")[1],
|
82 |
repo_id=QUEUE_REPO,
|
83 |
repo_type="dataset",
|
84 |
+
commit_message=f"Add {model_name} to eval queue",
|
85 |
)
|
86 |
|
87 |
# Remove the local file
|