lewtun HF staff commited on
Commit
b23bddd
β€’
1 Parent(s): 1329a21

Add test for empty username

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -448,11 +448,14 @@ with st.form(key="form"):
448
  print("INFO -- Selected models after filter:", selected_models)
449
 
450
  hf_username = st.text_input("Enter your πŸ€— Hub username to be notified when the evaluation is finished")
 
451
 
452
  submit_button = st.form_submit_button("Evaluate models πŸš€")
453
 
454
  if submit_button:
455
- if len(selected_models) > 10:
 
 
456
  st.warning("Only 10 models can be evaluated at once. Please select fewer models to evaluate.")
457
  elif len(selected_models) > 0 and len(selected_models) <= 10:
458
  project_id = str(uuid.uuid4())[:8]
 
448
  print("INFO -- Selected models after filter:", selected_models)
449
 
450
  hf_username = st.text_input("Enter your πŸ€— Hub username to be notified when the evaluation is finished")
451
+ st.write(hf_username)
452
 
453
  submit_button = st.form_submit_button("Evaluate models πŸš€")
454
 
455
  if submit_button:
456
+ if len(hf_username) == 0:
457
+ st.warning("No πŸ€— Hub username provided! Please enter your username and try again.")
458
+ elif len(selected_models) > 10:
459
  st.warning("Only 10 models can be evaluated at once. Please select fewer models to evaluate.")
460
  elif len(selected_models) > 0 and len(selected_models) <= 10:
461
  project_id = str(uuid.uuid4())[:8]