Spaces:
Runtime error
Runtime error
Better check of submission inputs
Browse files
app.py
CHANGED
@@ -229,15 +229,15 @@ with gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main:
|
|
229 |
submission_inputs = dict.fromkeys(SUBMISSION_INPUTS)
|
230 |
|
231 |
with gr.Row():
|
232 |
-
submission_inputs["team_name"] = gr.Textbox(label='Team name')
|
233 |
-
submission_inputs["model_name"] = gr.Textbox(label='Model name')
|
234 |
submission_inputs["model_type"] = gr.Textbox(label='Model type')
|
235 |
submission_inputs["parameters"] = gr.Textbox(label='Parameters')
|
236 |
|
237 |
with gr.Row():
|
238 |
submission_inputs["precision"] = gr.Textbox(label='Precision')
|
239 |
-
submission_inputs["description"] = gr.Textbox(label='Description', type='text')
|
240 |
-
submission_inputs["link_to_model"] = gr.Textbox(label='Link to model', type='text')
|
241 |
|
242 |
submission_inputs["submission_file"] = gr.File(label='Upload your results', type='filepath')
|
243 |
|
|
|
229 |
submission_inputs = dict.fromkeys(SUBMISSION_INPUTS)
|
230 |
|
231 |
with gr.Row():
|
232 |
+
submission_inputs["team_name"] = gr.Textbox(label='Team name').replace("\n", " ").strip()
|
233 |
+
submission_inputs["model_name"] = gr.Textbox(label='Model name').replace("\n", " ").strip()
|
234 |
submission_inputs["model_type"] = gr.Textbox(label='Model type')
|
235 |
submission_inputs["parameters"] = gr.Textbox(label='Parameters')
|
236 |
|
237 |
with gr.Row():
|
238 |
submission_inputs["precision"] = gr.Textbox(label='Precision')
|
239 |
+
submission_inputs["description"] = gr.Textbox(label='Description', type='text').strip()
|
240 |
+
submission_inputs["link_to_model"] = gr.Textbox(label='Link to model', type='text').strip() # TODO: kontrola funkčního URL
|
241 |
|
242 |
submission_inputs["submission_file"] = gr.File(label='Upload your results', type='filepath')
|
243 |
|
server.py
CHANGED
@@ -204,6 +204,7 @@ class LeaderboardServer:
|
|
204 |
"model_predictions_sha256",
|
205 |
"model_results_sha256",
|
206 |
)])
|
|
|
207 |
return submission_id
|
208 |
|
209 |
@staticmethod
|
|
|
204 |
"model_predictions_sha256",
|
205 |
"model_results_sha256",
|
206 |
)])
|
207 |
+
submission_id = submission_id.replace("/", "_").replace("\n", "_").strip()
|
208 |
return submission_id
|
209 |
|
210 |
@staticmethod
|