Spaces:
Sleeping
Sleeping
Ray Leung
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,8 +33,9 @@ for message in st.session_state.messages:
|
|
| 33 |
# Function for generating LLM response
|
| 34 |
def generate_response(prompt_input, email, passwd):
|
| 35 |
# Hugging Face Login
|
|
|
|
| 36 |
sign = Login(email, passwd)
|
| 37 |
-
cookies = sign.login()
|
| 38 |
# Create ChatBot
|
| 39 |
chatbot = hugchat.ChatBot(cookies=cookies.get_dict())
|
| 40 |
return chatbot.chat(prompt_input)
|
|
|
|
| 33 |
# Function for generating LLM response
|
| 34 |
def generate_response(prompt_input, email, passwd):
|
| 35 |
# Hugging Face Login
|
| 36 |
+
cookie_path_dir = "./cookies/"
|
| 37 |
sign = Login(email, passwd)
|
| 38 |
+
cookies = sign.login(cookie_dir_path=cookie_path_dir, save_cookies=True)
|
| 39 |
# Create ChatBot
|
| 40 |
chatbot = hugchat.ChatBot(cookies=cookies.get_dict())
|
| 41 |
return chatbot.chat(prompt_input)
|