Spaces:
Runtime error
Runtime error
Add test for empty username
Browse files
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(
|
|
|
|
|
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]
|