Walid-Ahmed commited on
Commit
2d46fda
·
verified ·
1 Parent(s): ef6149e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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