javiervz commited on
Commit
196a0dc
·
verified ·
1 Parent(s): 8e8ff91

Update rag_hf.py

Browse files
Files changed (1) hide show
  1. rag_hf.py +4 -0
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/")