Spaces:
Runtime error
Runtime error
Last approach
Browse files
app.py
CHANGED
@@ -237,11 +237,19 @@ class GAIAAgent:
|
|
237 |
def __init__(self):
|
238 |
print("Initializing GAIA Agent...")
|
239 |
|
240 |
-
# Initialize model with InferenceClientModel
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
|
246 |
# Custom tools list
|
247 |
custom_tools = [
|
|
|
237 |
def __init__(self):
|
238 |
print("Initializing GAIA Agent...")
|
239 |
|
240 |
+
# Initialize model with InferenceClientModel
|
241 |
+
try:
|
242 |
+
# Use a more capable model for the agent
|
243 |
+
self.model = InferenceClientModel(
|
244 |
+
model_id="microsoft/DialoGPT-medium",
|
245 |
+
token=os.getenv("HUGGINGFACE_INFERENCE_TOKEN")
|
246 |
+
)
|
247 |
+
except Exception as e:
|
248 |
+
print(f"Error initializing model: {e}")
|
249 |
+
# Fallback to a simpler approach if the model fails
|
250 |
+
self.model = InferenceClientModel(
|
251 |
+
model_id="microsoft/DialoGPT-medium"
|
252 |
+
)
|
253 |
|
254 |
# Custom tools list
|
255 |
custom_tools = [
|