Spaces:
Running
Running
Recovery from exception
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def process_submission(*inputs):
|
|
59 |
metadata = SUBMISSION_INPUTS - {"submission_file"}
|
60 |
metadata = {key: inputs[key] for key in metadata}
|
61 |
|
62 |
-
gr.Info('Submission valid, running
|
63 |
|
64 |
leaderboard_server.prepare_model_for_submission(inputs["submission_file"], metadata)
|
65 |
except ValueError as err:
|
@@ -72,6 +72,16 @@ def process_submission(*inputs):
|
|
72 |
gr.update(visible=False),
|
73 |
gr.update(visible=False),
|
74 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
return (
|
76 |
gr.update(visible=False),
|
77 |
gr.update(visible=True),
|
|
|
59 |
metadata = SUBMISSION_INPUTS - {"submission_file"}
|
60 |
metadata = {key: inputs[key] for key in metadata}
|
61 |
|
62 |
+
gr.Info('Submission valid, running tournament...')
|
63 |
|
64 |
leaderboard_server.prepare_model_for_submission(inputs["submission_file"], metadata)
|
65 |
except ValueError as err:
|
|
|
72 |
gr.update(visible=False),
|
73 |
gr.update(visible=False),
|
74 |
)
|
75 |
+
except TypeError as err:
|
76 |
+
gr.Warning(str(err))
|
77 |
+
return (
|
78 |
+
gr.update(value='Pre-submit model', visible=True, interactive=True),
|
79 |
+
gr.update(visible=False),
|
80 |
+
gr.update(visible=False),
|
81 |
+
gr.update(visible=False),
|
82 |
+
gr.update(visible=False),
|
83 |
+
gr.update(visible=False),
|
84 |
+
)
|
85 |
return (
|
86 |
gr.update(visible=False),
|
87 |
gr.update(visible=True),
|