cowrycode commited on
Commit
6ca0310
·
verified ·
1 Parent(s): 3a5e8f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -66,11 +66,11 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
66
  submit_url = f"{api_url}/submit"
67
 
68
  # 1. Instantiate Agent ( modify this part to create your agent)
69
- try:
70
- agent = BasicAgent()
71
- except Exception as e:
72
- print(f"Error instantiating agent: {e}")
73
- return f"Error initializing agent: {e}", None
74
  #In the case of an app running as a hugging Face space, this link points toward your codebase ( usefull for others so please keep it public)
75
  agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
76
  print(agent_code)
@@ -121,6 +121,11 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
121
  #3A
122
 
123
  async def run_all_questions(questions_data):
 
 
 
 
 
124
  question_text = questions_data[0].get("question")
125
  task_id = questions_data[0].get("task_id")
126
  print(f"Processing my question 0 : : : : : : :")
 
66
  submit_url = f"{api_url}/submit"
67
 
68
  # 1. Instantiate Agent ( modify this part to create your agent)
69
+ # try:
70
+ # agent = BasicAgent()
71
+ # except Exception as e:
72
+ # print(f"Error instantiating agent: {e}")
73
+ # return f"Error initializing agent: {e}", None
74
  #In the case of an app running as a hugging Face space, this link points toward your codebase ( usefull for others so please keep it public)
75
  agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
76
  print(agent_code)
 
121
  #3A
122
 
123
  async def run_all_questions(questions_data):
124
+ try:
125
+ agent = BasicAgent()
126
+ except Exception as e:
127
+ print(f"Error instantiating agent: {e}")
128
+ return f"Error initializing agent: {e}", None
129
  question_text = questions_data[0].get("question")
130
  task_id = questions_data[0].get("task_id")
131
  print(f"Processing my question 0 : : : : : : :")