Update app.py
Browse files
app.py
CHANGED
|
@@ -364,9 +364,10 @@ class GAIAAgent:
|
|
| 364 |
|
| 365 |
# Initialize the model with fallback options
|
| 366 |
try:
|
|
|
|
| 367 |
# Try powerful model first - but use one that's more widely available
|
| 368 |
model_id = "meta-llama/Llama-3.3-70B-Instruct"
|
| 369 |
-
self.model = InferenceClientModel(model_id=model_id)
|
| 370 |
print(f"✅ Model initialized successfully: {model_id}")
|
| 371 |
except Exception as e:
|
| 372 |
print(f"⚠️ Error with primary model: {e}")
|
|
|
|
| 364 |
|
| 365 |
# Initialize the model with fallback options
|
| 366 |
try:
|
| 367 |
+
hf_token = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_HUB_TOKEN")
|
| 368 |
# Try powerful model first - but use one that's more widely available
|
| 369 |
model_id = "meta-llama/Llama-3.3-70B-Instruct"
|
| 370 |
+
self.model = InferenceClientModel(model_id=model_id, token=hf_token)
|
| 371 |
print(f"✅ Model initialized successfully: {model_id}")
|
| 372 |
except Exception as e:
|
| 373 |
print(f"⚠️ Error with primary model: {e}")
|