Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,11 @@ import numpy as np
|
|
| 8 |
import json
|
| 9 |
import re
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# --- Load necessary components for the RAG system ---
|
| 12 |
# These paths are relative to the Space's root directory
|
| 13 |
FAISS_INDEX_PATH = "sol_faiss_index.bin"
|
|
|
|
| 8 |
import json
|
| 9 |
import re
|
| 10 |
|
| 11 |
+
# Add these two lines at the very top, after imports
|
| 12 |
+
from huggingface_hub import HfFolder
|
| 13 |
+
# This line tells the huggingface_hub to use the 'HF_KEY' environment variable for authentication
|
| 14 |
+
HfFolder.save_token(os.environ.get("HF_KEY"))
|
| 15 |
+
|
| 16 |
# --- Load necessary components for the RAG system ---
|
| 17 |
# These paths are relative to the Space's root directory
|
| 18 |
FAISS_INDEX_PATH = "sol_faiss_index.bin"
|