Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,9 +7,9 @@ import os
|
|
| 7 |
BOT_ICON = "https://raw.githubusercontent.com/GeminiFan207/Secialix_Chatbot/main/IMG_0528-removebg-preview.png"
|
| 8 |
|
| 9 |
# Load API token from Hugging Face Spaces secrets
|
| 10 |
-
API_TOKEN = os.getenv("
|
| 11 |
if not API_TOKEN:
|
| 12 |
-
raise ValueError("
|
| 13 |
API_URL = "https://api-inference.huggingface.co/models/ZeppelinCorp/Charm_15"
|
| 14 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
| 15 |
|
|
|
|
| 7 |
BOT_ICON = "https://raw.githubusercontent.com/GeminiFan207/Secialix_Chatbot/main/IMG_0528-removebg-preview.png"
|
| 8 |
|
| 9 |
# Load API token from Hugging Face Spaces secrets
|
| 10 |
+
API_TOKEN = os.getenv("HF_API_KEY") # Set this in Spaces Secrets
|
| 11 |
if not API_TOKEN:
|
| 12 |
+
raise ValueError("HF_API_KEY not set in Spaces Secrets. Please configure it in the Space settings.")
|
| 13 |
API_URL = "https://api-inference.huggingface.co/models/ZeppelinCorp/Charm_15"
|
| 14 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
| 15 |
|