Blanca commited on
Commit
b4d3961
·
verified ·
1 Parent(s): 7c5447c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -150,6 +150,14 @@ def add_new_eval(
150
  mail: str,
151
  profile: gr.OAuthProfile,
152
  ):
 
 
 
 
 
 
 
 
153
  # Was the profile created less than 2 month ago?
154
  user_data = requests.get(f"https://huggingface.co/api/users/{profile.username}/overview")
155
  creation_date = json.loads(user_data.content)["createdAt"]
 
150
  mail: str,
151
  profile: gr.OAuthProfile,
152
  ):
153
+
154
+ # --- NEW: Mandatory Field Check ---
155
+ if not organisation or organisation.strip() == "":
156
+ return format_warning("Please provide an Author/Team name before submitting.")
157
+
158
+ if not model or model.strip() == "":
159
+ return format_warning("Please provide a Submission name.")
160
+ # ----------------------------------
161
  # Was the profile created less than 2 month ago?
162
  user_data = requests.get(f"https://huggingface.co/api/users/{profile.username}/overview")
163
  creation_date = json.loads(user_data.content)["createdAt"]