vashu2425 commited on
Commit
99fb469
·
verified ·
1 Parent(s): 920b6b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -13,18 +13,10 @@ from huggingface_hub import hf_hub_download
13
  st.set_page_config(layout="wide")
14
 
15
  # ================== CONFIGURATION ================== #
16
- HF_TOKEN = os.getenv("HF_TOKEN")
17
  VECTORSTORE_REPO_ID = "vashu2425/bhagavad-geeta-faiss-vectordb"
18
  MODEL_REPO_ID = "mistralai/Mixtral-8x7B-Instruct-v0.1"
19
 
20
- # 🔒 Security Gate - Critical!
21
- if not HF_TOKEN:
22
- st.error("""🔐 Authentication Error!
23
- Missing Hugging Face Token. Please:
24
- 1. Go to Space Settings → Secrets
25
- 2. Add secret named 'HF_TOKEN'
26
- 3. Use your token (starts with 'hf_...')""")
27
- st.stop()
28
 
29
  CUSTOM_PROMPT_TEMPLATE = """
30
  Use The Pieces Of Information Provided In The Context To Answer User's Question.
 
13
  st.set_page_config(layout="wide")
14
 
15
  # ================== CONFIGURATION ================== #
16
+ HF_TOKEN = os.getenv("HF_TOKEN") # From Spaces secrets
17
  VECTORSTORE_REPO_ID = "vashu2425/bhagavad-geeta-faiss-vectordb"
18
  MODEL_REPO_ID = "mistralai/Mixtral-8x7B-Instruct-v0.1"
19
 
 
 
 
 
 
 
 
 
20
 
21
  CUSTOM_PROMPT_TEMPLATE = """
22
  Use The Pieces Of Information Provided In The Context To Answer User's Question.