Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,7 +76,7 @@ class BasicAgent:
|
|
| 76 |
|
| 77 |
|
| 78 |
def __call__(self, question: str) -> str:
|
| 79 |
-
|
| 80 |
print(f"\n➡️ Agent received question: {question[:80]}")
|
| 81 |
|
| 82 |
# Use local model
|
|
@@ -92,7 +92,7 @@ class BasicAgent:
|
|
| 92 |
print(f"✅ Agent returning answer: {answer[:100]}...")
|
| 93 |
return answer
|
| 94 |
|
| 95 |
-
|
| 96 |
print(f"❌ Agent encountered an error: {e}")
|
| 97 |
traceback.print_exc()
|
| 98 |
return f"Error generating answer: {e}"
|
|
|
|
| 76 |
|
| 77 |
|
| 78 |
def __call__(self, question: str) -> str:
|
| 79 |
+
try:
|
| 80 |
print(f"\n➡️ Agent received question: {question[:80]}")
|
| 81 |
|
| 82 |
# Use local model
|
|
|
|
| 92 |
print(f"✅ Agent returning answer: {answer[:100]}...")
|
| 93 |
return answer
|
| 94 |
|
| 95 |
+
except Exception as e:
|
| 96 |
print(f"❌ Agent encountered an error: {e}")
|
| 97 |
traceback.print_exc()
|
| 98 |
return f"Error generating answer: {e}"
|