idolezal commited on
Commit
233a602
ยท
2 Parent(s): b870251 9529938

Merge remote-tracking branch 'xdolez52/main'

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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://")):
@@ -277,12 +277,12 @@ with gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main:
277
  submission_inputs["model_name"] = gr.Textbox(label='Model name', type='text')
278
  submission_inputs["model_type"] = gr.Dropdown(
279
  label="Model type",
280
- choices=("chat", "pretrained", "ensamble"),
281
  )
282
  submission_inputs["parameters"] = gr.Number(
283
  label='Parameters (B)',
284
  value=0.1,
285
- step=0.1,
286
  )
287
 
288
  with gr.Row():
 
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://")):
 
277
  submission_inputs["model_name"] = gr.Textbox(label='Model name', type='text')
278
  submission_inputs["model_type"] = gr.Dropdown(
279
  label="Model type",
280
+ choices=("chat", "pretrained", "ensemble"),
281
  )
282
  submission_inputs["parameters"] = gr.Number(
283
  label='Parameters (B)',
284
  value=0.1,
285
+ step=0.01,
286
  )
287
 
288
  with gr.Row():