JuyeopDang commited on
Commit
5508b31
·
verified ·
1 Parent(s): c7e33d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -18,7 +18,7 @@ GROQ_KEY = os.environ['GROQ_KEY']
18
  class LLaMaAgent:
19
  def __init__(self):
20
  self.model = model = LiteLLMModel(
21
- "llama-3.3-70b-versatile",
22
  api_base="https://api.groq.com/openai/v1",
23
  api_key=GROQ_KEY,
24
  )
@@ -46,7 +46,7 @@ class LLaMaAgent2:
46
  )
47
  self.model.flatten_messages_as_text = True
48
 
49
- self.agent = CodeAgent(
50
  tools=[DuckDuckGoSearchTool(), FinalAnswerTool(), VisitWebpageTool(), PythonInterpreterTool()],
51
  model=model,
52
  )
@@ -125,6 +125,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
125
  submitted_answer = llama(question_text)
126
  except Exception as ke:
127
  print("Second LLaMa Error!")
 
128
  submitted_answer = llama2(question_text)
129
  print(f"\n\n### Answer{submitted_answer} ###\n\n")
130
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
@@ -132,7 +133,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
132
  except Exception as e:
133
  print(f"Error running agent on task {task_id}: {e}")
134
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
135
- time.sleep(90)
136
 
137
  if not answers_payload:
138
  print("Agent did not produce any answers to submit.")
 
18
  class LLaMaAgent:
19
  def __init__(self):
20
  self.model = model = LiteLLMModel(
21
+ "meta-llama/llama-4-scout-17b-16e-instruct",
22
  api_base="https://api.groq.com/openai/v1",
23
  api_key=GROQ_KEY,
24
  )
 
46
  )
47
  self.model.flatten_messages_as_text = True
48
 
49
+ self.agent = ToolCallingAgent(
50
  tools=[DuckDuckGoSearchTool(), FinalAnswerTool(), VisitWebpageTool(), PythonInterpreterTool()],
51
  model=model,
52
  )
 
125
  submitted_answer = llama(question_text)
126
  except Exception as ke:
127
  print("Second LLaMa Error!")
128
+ time.sleep(60)
129
  submitted_answer = llama2(question_text)
130
  print(f"\n\n### Answer{submitted_answer} ###\n\n")
131
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
 
133
  except Exception as e:
134
  print(f"Error running agent on task {task_id}: {e}")
135
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
136
+ time.sleep(60)
137
 
138
  if not answers_payload:
139
  print("Agent did not produce any answers to submit.")