JuyeopDang commited on
Commit
bb9c9cc
·
verified ·
1 Parent(s): c1b3f12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -30,8 +30,12 @@ class LLaMaAgent:
30
  )
31
 
32
  def __call__(self, question: str) -> str:
33
- response = self.agent.run(question)
34
- return response
 
 
 
 
35
 
36
  class CompoundAgent:
37
  def __init__(self):
@@ -151,6 +155,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
151
  try:
152
  submitted_answer = llama(question_text)
153
  except Exception as ke:
 
154
  submitted_answer = compound(question_text)
155
  print(f"\n\n### Answer{submitted_answer} ###\n\n")
156
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
 
30
  )
31
 
32
  def __call__(self, question: str) -> str:
33
+ try:
34
+ response = self.agent.run(question)
35
+ return response
36
+ except Exception as e:
37
+ print("First LLaMa Error!!!")
38
+ raise
39
 
40
  class CompoundAgent:
41
  def __init__(self):
 
155
  try:
156
  submitted_answer = llama(question_text)
157
  except Exception as ke:
158
+ print("Second LLaMa Error!")
159
  submitted_answer = compound(question_text)
160
  print(f"\n\n### Answer{submitted_answer} ###\n\n")
161
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})