gmmcleod commited on
Commit
a107b35
·
verified ·
1 Parent(s): ed45b0a

no filename parameter error message

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -391,10 +391,6 @@ def import_and_run_function(script_path, function_name, filename):
391
  print("FUNCTION TO RUN")
392
  print(function_to_run)
393
  params = list(sig.parameters.values())
394
- print("PARAMS")
395
- print(params)
396
- print("PARAMS LENGTH")
397
- print(len(params))
398
  if len(params) != 1 or params[0].kind not in [inspect.Parameter.POSITIONAL_OR_KEYWORD]:
399
  set_error_message("Error: Function must have exactly one parameter (filepath).")
400
  return None
@@ -494,6 +490,9 @@ def update_leaderboard(username, zip_file):
494
 
495
  try:
496
  updated_leaderboard = evaluate_model(username, python_script)
 
 
 
497
  except Exception as e:
498
  print("Error in eval mode:", str(e))
499
  return f"Error evaluating model: {str(e)}", None
 
391
  print("FUNCTION TO RUN")
392
  print(function_to_run)
393
  params = list(sig.parameters.values())
 
 
 
 
394
  if len(params) != 1 or params[0].kind not in [inspect.Parameter.POSITIONAL_OR_KEYWORD]:
395
  set_error_message("Error: Function must have exactly one parameter (filepath).")
396
  return None
 
490
 
491
  try:
492
  updated_leaderboard = evaluate_model(username, python_script)
493
+
494
+ if update_leaderboard == None:
495
+ return None
496
  except Exception as e:
497
  print("Error in eval mode:", str(e))
498
  return f"Error evaluating model: {str(e)}", None