Update rag_hf.py
Browse files
rag_hf.py
CHANGED
@@ -15,6 +15,10 @@ from sentence_transformers import SentenceTransformer
|
|
15 |
ENDPOINT_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
|
16 |
#ENDPOINT_URL = "https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.3"
|
17 |
HF_API_TOKEN = os.getenv("HF_API_TOKEN")
|
|
|
|
|
|
|
|
|
18 |
EMBEDDING_MODEL = "intfloat/multilingual-e5-base"
|
19 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
20 |
EX = Namespace("http://example.org/lang/")
|
|
|
15 |
ENDPOINT_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
|
16 |
#ENDPOINT_URL = "https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.3"
|
17 |
HF_API_TOKEN = os.getenv("HF_API_TOKEN")
|
18 |
+
if not HF_API_TOKEN:
|
19 |
+
st.error("⚠️ No se cargó el token HF_API_TOKEN desde los Secrets.")
|
20 |
+
else:
|
21 |
+
st.success("✅ Token cargado correctamente.")
|
22 |
EMBEDDING_MODEL = "intfloat/multilingual-e5-base"
|
23 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
24 |
EX = Namespace("http://example.org/lang/")
|