Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,11 @@ from huggingface_hub import login
|
|
| 6 |
|
| 7 |
# Load the Hugging Face token from Secrets (recommended for public Spaces)
|
| 8 |
hf_token = os.getenv("HUGGINGFACE_TOKEN")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Model details
|
| 11 |
BASE_MODEL = "mistralai/Mistral-7B-Instruct-v0.1"
|
|
|
|
| 6 |
|
| 7 |
# Load the Hugging Face token from Secrets (recommended for public Spaces)
|
| 8 |
hf_token = os.getenv("HUGGINGFACE_TOKEN")
|
| 9 |
+
if hf_token:
|
| 10 |
+
login(hf_token)
|
| 11 |
+
print("β
Successfully logged in to Hugging Face Hub")
|
| 12 |
+
else:
|
| 13 |
+
print("β Hugging Face token not found. Make sure it's set in 'Secrets'.")
|
| 14 |
|
| 15 |
# Model details
|
| 16 |
BASE_MODEL = "mistralai/Mistral-7B-Instruct-v0.1"
|