Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -220,12 +220,12 @@ class HfAgentWrapper:
|
|
220 |
print("self.agent does not have a 'toolbox' attribute (this would be unexpected).")
|
221 |
# --- End of robust toolbox inspection ---
|
222 |
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
|
230 |
# __call__ method remains the same
|
231 |
def __call__(self, question: str) -> str:
|
|
|
220 |
print("self.agent does not have a 'toolbox' attribute (this would be unexpected).")
|
221 |
# --- End of robust toolbox inspection ---
|
222 |
|
223 |
+
except Exception as e:
|
224 |
+
print(f"CRITICAL ERROR: Failed to initialize HfAgent: {e}")
|
225 |
+
import traceback
|
226 |
+
print("Full traceback of HfAgent initialization error:")
|
227 |
+
traceback.print_exc()
|
228 |
+
raise RuntimeError(f"HfAgent initialization failed: {e}") from e
|
229 |
|
230 |
# __call__ method remains the same
|
231 |
def __call__(self, question: str) -> str:
|