Spaces:
Runtime error
Runtime error
validate_submission_inputs of input_length
Browse files
app.py
CHANGED
@@ -44,6 +44,8 @@ def validate_submission_inputs(**inputs):
|
|
44 |
raise ValueError('Link does not starts with "http://" or "https://"')
|
45 |
if not inputs["parameters"] > 0:
|
46 |
raise ValueError('Attribute `Parameters (B)` should be greater than zero')
|
|
|
|
|
47 |
|
48 |
def process_submission(*inputs):
|
49 |
try:
|
|
|
44 |
raise ValueError('Link does not starts with "http://" or "https://"')
|
45 |
if not inputs["parameters"] > 0:
|
46 |
raise ValueError('Attribute `Parameters (B)` should be greater than zero')
|
47 |
+
if not inputs["input_length"] > 0 and inputs["input_length"] != int(inputs["input_length"]):
|
48 |
+
raise ValueError('Attribute `Input length (# tokens)` should be greater than zero and integer type')
|
49 |
|
50 |
def process_submission(*inputs):
|
51 |
try:
|