Spaces:
Running
Running
Fixed `submission_file == None`
Browse files
app.py
CHANGED
@@ -33,11 +33,10 @@ SUBMISSION_INPUTS = dict.fromkeys((
|
|
33 |
def on_submit_pressed():
|
34 |
return gr.update(value='Processing submission...', interactive=False)
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
if SUBMISSION_INPUTS - set(kwargs) != set():
|
39 |
raise ValueError('Please fill in all fields')
|
40 |
-
if not os.path.exists(
|
41 |
raise ValueError('File does not exist')
|
42 |
|
43 |
def process_submission(*inputs):
|
|
|
33 |
def on_submit_pressed():
|
34 |
return gr.update(value='Processing submission...', interactive=False)
|
35 |
|
36 |
+
def validate_submission_inputs(**inputs):
|
37 |
+
if any(key for key, value in inputs.items() if value in (None, "")):
|
|
|
38 |
raise ValueError('Please fill in all fields')
|
39 |
+
if not os.path.exists(inputs["submission_file"]):
|
40 |
raise ValueError('File does not exist')
|
41 |
|
42 |
def process_submission(*inputs):
|