pavan-d commited on
Commit
9f3a96d
·
verified ·
1 Parent(s): 81917a3

Update app.py

Browse files

added sample test

Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -14,10 +14,15 @@ class BasicAgent:
14
  def __init__(self):
15
  print("BasicAgent initialized.")
16
  def __call__(self, question: str) -> str:
17
- print(f"Agent received question (first 50 chars): {question[:50]}...")
18
- fixed_answer = "This is a default answer."
19
- print(f"Agent returning fixed answer: {fixed_answer}")
20
- return fixed_answer
 
 
 
 
 
21
 
22
  def run_and_submit_all( profile: gr.OAuthProfile | None):
23
  """
 
14
  def __init__(self):
15
  print("BasicAgent initialized.")
16
  def __call__(self, question: str) -> str:
17
+ print(f"Agent received question: {question}")
18
+
19
+ # Simple hardcoded logic
20
+ if "capital of France" in question.lower():
21
+ return "Paris"
22
+ elif "2 + 2" in question:
23
+ return "4"
24
+ else:
25
+ return "I don't know"
26
 
27
  def run_and_submit_all( profile: gr.OAuthProfile | None):
28
  """