Spaces:
Running
Running
More info notifications
Browse files
app.py
CHANGED
@@ -93,7 +93,7 @@ def process_submission(*inputs):
|
|
93 |
metadata = SUBMISSION_INPUTS - {"submission_file"}
|
94 |
metadata = {key: inputs[key] for key in metadata}
|
95 |
|
96 |
-
gr.Info('Submission valid, going to
|
97 |
|
98 |
pre_submit = leaderboard_server.prepare_model_for_submission(inputs["submission_file"], metadata)
|
99 |
except ValueError as err:
|
@@ -123,7 +123,6 @@ def process_submission(*inputs):
|
|
123 |
gr.update(visible=False),
|
124 |
)
|
125 |
|
126 |
-
gr.Info('Tournament finished!', duration=5)
|
127 |
gr.Info('You can see the results of your model below.', duration=15)
|
128 |
|
129 |
if HF_DISABLE_SUBMIT:
|
@@ -184,6 +183,7 @@ def submit_results(*inputs):
|
|
184 |
with open(inputs["submission_file"]) as fp:
|
185 |
data = json.load(fp)
|
186 |
metadata = data["submission_metadata"]
|
|
|
187 |
leaderboard_server.save_model_submission(inputs["submission_file"], metadata)
|
188 |
gr.Info('Submission successful!')
|
189 |
|
@@ -981,7 +981,7 @@ def gradio_app():
|
|
981 |
]
|
982 |
).then(
|
983 |
fn=lambda *inputs: tuple(
|
984 |
-
gr.update(interactive=True)
|
985 |
for _ in inputs
|
986 |
),
|
987 |
inputs=list(submission_inputs.values()),
|
|
|
93 |
metadata = SUBMISSION_INPUTS - {"submission_file"}
|
94 |
metadata = {key: inputs[key] for key in metadata}
|
95 |
|
96 |
+
gr.Info('Submission valid, going to the tournament…')
|
97 |
|
98 |
pre_submit = leaderboard_server.prepare_model_for_submission(inputs["submission_file"], metadata)
|
99 |
except ValueError as err:
|
|
|
123 |
gr.update(visible=False),
|
124 |
)
|
125 |
|
|
|
126 |
gr.Info('You can see the results of your model below.', duration=15)
|
127 |
|
128 |
if HF_DISABLE_SUBMIT:
|
|
|
183 |
with open(inputs["submission_file"]) as fp:
|
184 |
data = json.load(fp)
|
185 |
metadata = data["submission_metadata"]
|
186 |
+
gr.Info('Checking if the tournament is complete…')
|
187 |
leaderboard_server.save_model_submission(inputs["submission_file"], metadata)
|
188 |
gr.Info('Submission successful!')
|
189 |
|
|
|
981 |
]
|
982 |
).then(
|
983 |
fn=lambda *inputs: tuple(
|
984 |
+
gr.update(value=None, interactive=True)
|
985 |
for _ in inputs
|
986 |
),
|
987 |
inputs=list(submission_inputs.values()),
|
server.py
CHANGED
@@ -978,7 +978,11 @@ class LeaderboardServer:
|
|
978 |
)
|
979 |
self.pre_submit[submission_id] = pre_submit
|
980 |
|
|
|
|
|
981 |
if do_submit:
|
|
|
|
|
982 |
self._upload_submission(pre_submit.submission_id, pre_submit.file)
|
983 |
self._upload_tournament_results(pre_submit.tournament_results)
|
984 |
self.update_leaderboard()
|
|
|
978 |
)
|
979 |
self.pre_submit[submission_id] = pre_submit
|
980 |
|
981 |
+
info_msg = 'Tournament finished!'
|
982 |
+
gr.Info(info_msg, duration=5)
|
983 |
if do_submit:
|
984 |
+
print(info_msg)
|
985 |
+
gr.Info("Uploading…", duration=5)
|
986 |
self._upload_submission(pre_submit.submission_id, pre_submit.file)
|
987 |
self._upload_tournament_results(pre_submit.tournament_results)
|
988 |
self.update_leaderboard()
|