Spaces:
Running
Running
The description input field is optional
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ def on_submit_pressed():
|
|
36 |
return gr.update(value='Processing submission...', interactive=False)
|
37 |
|
38 |
def validate_submission_inputs(**inputs):
|
39 |
-
if any(key for key, value in inputs.items() if value in (None, "")):
|
40 |
-
raise ValueError('Please fill in all fields')
|
41 |
if not os.path.exists(inputs["submission_file"]):
|
42 |
raise ValueError('File does not exist')
|
43 |
if not (inputs["link_to_model"].startswith("http://") or inputs["link_to_model"].startswith("https://")):
|
|
|
36 |
return gr.update(value='Processing submission...', interactive=False)
|
37 |
|
38 |
def validate_submission_inputs(**inputs):
|
39 |
+
if any(key for key, value in inputs.items() if key != "description" and value in (None, "")):
|
40 |
+
raise ValueError('Please fill in all fields (only the description field is optional)')
|
41 |
if not os.path.exists(inputs["submission_file"]):
|
42 |
raise ValueError('File does not exist')
|
43 |
if not (inputs["link_to_model"].startswith("http://") or inputs["link_to_model"].startswith("https://")):
|