Ryu-m0m commited on
Commit
14296dc
·
verified ·
1 Parent(s): f362774

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -25,7 +25,10 @@ model_name = 'mistralai/Mistral-7B-Instruct-v0.3'
25
  HF_TOKEN = st.sidebar.text_input("Enter your Hugging Face token:", "YOUR_HF_TOKEN", type="password")
26
 
27
  # Hugging Face login
28
- login(token=HF_TOKEN)
 
 
 
29
 
30
  # Memory for chat history
31
  if "history" not in st.session_state:
 
25
  HF_TOKEN = st.sidebar.text_input("Enter your Hugging Face token:", "YOUR_HF_TOKEN", type="password")
26
 
27
  # Hugging Face login
28
+ if HF_TOKEN and HF_TOKEN != "YOUR_HF_TOKEN":
29
+ login(token=HF_TOKEN)
30
+ else:
31
+ st.sidebar.warning("Please enter a valid Hugging Face token to proceed.")
32
 
33
  # Memory for chat history
34
  if "history" not in st.session_state: