LamiaYT commited on
Commit
43f8600
·
1 Parent(s): e35415b

Last approach

Browse files
Files changed (1) hide show
  1. app.py +13 -5
app.py CHANGED
@@ -237,11 +237,19 @@ class GAIAAgent:
237
  def __init__(self):
238
  print("Initializing GAIA Agent...")
239
 
240
- # Initialize model with InferenceClientModel instead of HfApiModel
241
- self.model = InferenceClientModel(
242
- model_id="microsoft/DialoGPT-medium",
243
- token=os.getenv("HUGGINGFACE_INFERENCE_TOKEN")
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 = [