saraht14 commited on
Commit
40c0842
·
verified ·
1 Parent(s): 50f8f5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -162,6 +162,8 @@ def evaluate_model(username, file):
162
  # print(f"HELLO: {hello}")
163
  # import
164
  sectors_model = import_and_run_function(file, "eval")
 
 
165
 
166
  print("SECTORS MODEL: ", sectors_model)
167
  # sectors_model = eval(filename)
@@ -208,7 +210,7 @@ def import_and_run_function(script_path, function_name="eval"):
208
  if hasattr(module, function_name):
209
  function_to_run = getattr(module, function_name)
210
  result = function_to_run()
211
- print(f"TYPE: {type(result)}")
212
  return f"Function '{function_name}' executed successfully. Output: {result}"
213
  else:
214
  return f"Error: Function '{function_name}' not found in {script_path}"
 
162
  # print(f"HELLO: {hello}")
163
  # import
164
  sectors_model = import_and_run_function(file, "eval")
165
+ print(f"TYPE: {type(sectors_model), {type(sectors_model[0])}}")
166
+
167
 
168
  print("SECTORS MODEL: ", sectors_model)
169
  # sectors_model = eval(filename)
 
210
  if hasattr(module, function_name):
211
  function_to_run = getattr(module, function_name)
212
  result = function_to_run()
213
+ print(f"TYPE: {type(result), {type(result[0])}}")
214
  return f"Function '{function_name}' executed successfully. Output: {result}"
215
  else:
216
  return f"Error: Function '{function_name}' not found in {script_path}"