Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,8 @@ import os
|
|
| 4 |
|
| 5 |
# Hugging Face API Token (from secrets)
|
| 6 |
API_TOKEN = os.getenv("HF_API_KEY")
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
# Model Endpoint
|
| 10 |
model = "mistralai/Mixtral-8x7B-Instruct-v0.1" # Use a working instruct model
|
|
|
|
| 4 |
|
| 5 |
# Hugging Face API Token (from secrets)
|
| 6 |
API_TOKEN = os.getenv("HF_API_KEY")
|
| 7 |
+
if not API_TOKEN:
|
| 8 |
+
print("Error: API token is missing! Please add it as a secret in Hugging Face Spaces.")
|
| 9 |
|
| 10 |
# Model Endpoint
|
| 11 |
model = "mistralai/Mixtral-8x7B-Instruct-v0.1" # Use a working instruct model
|