seccily commited on
Commit
9c4d44a
·
verified ·
1 Parent(s): 8da9776

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -16,7 +16,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
16
  class BasicAgent:
17
  def __init__(self):
18
  print("Initializing BasicAgent.")
19
- model_id = "gemini/gemini-2.0-flash" # "Qwen/Qwen2.5-7B-Instruct-1M"
20
 
21
  self.model = LiteLLMModel(
22
  model_id=model_id,
@@ -41,11 +41,7 @@ class BasicAgent:
41
 
42
  def __call__(self, question: str) -> str:
43
  print(f"Agent received question (first 50 chars): {question[:50]}...")
44
- try:
45
- answer = self.agent.run(question)
46
- except:
47
- time.sleep(5)
48
- answer = self.agent.run(question)
49
  print(f"Agent returning the answer: {answer}")
50
  return answer
51
 
 
16
  class BasicAgent:
17
  def __init__(self):
18
  print("Initializing BasicAgent.")
19
+ model_id = "gemini/gemini-2.0-flash-lite" # "Qwen/Qwen2.5-7B-Instruct-1M"
20
 
21
  self.model = LiteLLMModel(
22
  model_id=model_id,
 
41
 
42
  def __call__(self, question: str) -> str:
43
  print(f"Agent received question (first 50 chars): {question[:50]}...")
44
+ answer = self.agent.run(question)
 
 
 
 
45
  print(f"Agent returning the answer: {answer}")
46
  return answer
47