tohid.abedini commited on
Commit
3cd6451
·
1 Parent(s): 09205b6

[Add] about

Browse files
Files changed (1) hide show
  1. utils.py +6 -0
utils.py CHANGED
@@ -207,6 +207,11 @@ def submit(model_name, model_id, contact_email, section, license):
207
  if model_name == "" or model_id == "" or section == "" or license == "":
208
  gr.Error("Please fill all the fields")
209
  return
 
 
 
 
 
210
  try:
211
  user_name = ""
212
  if "/" in model_id:
@@ -221,6 +226,7 @@ def submit(model_name, model_id, contact_email, section, license):
221
  "license": license
222
  }
223
 
 
224
  timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
225
 
226
  OUT_DIR = f"{EVAL_REQUESTS_PATH}/{user_name}"
 
207
  if model_name == "" or model_id == "" or section == "" or license == "":
208
  gr.Error("Please fill all the fields")
209
  return
210
+
211
+ if contact_email == "":
212
+ gr.Error("Contact email is required")
213
+ return
214
+
215
  try:
216
  user_name = ""
217
  if "/" in model_id:
 
226
  "license": license
227
  }
228
 
229
+ # Get the current timestamp to add to the filename
230
  timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
231
 
232
  OUT_DIR = f"{EVAL_REQUESTS_PATH}/{user_name}"