idolezal commited on
Commit
6268f11
β€’
1 Parent(s): 76b7a19

validate_submission_inputs of input_length

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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: