Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadded sample test
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
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
"""
|