moazzamdev commited on
Commit
a845d96
·
1 Parent(s): 63ab6be

Update page1.py

Browse files
Files changed (1) hide show
  1. page1.py +5 -2
page1.py CHANGED
@@ -7,7 +7,10 @@ from langchain.memory import ConversationBufferMemory
7
  from langchain.memory.chat_message_histories import StreamlitChatMessageHistory
8
  from streamlit_chat import message
9
  import time
10
- import random
 
 
 
11
  def text():
12
  st.markdown("""
13
  <style>
@@ -43,7 +46,7 @@ def text():
43
 
44
  with st.chat_message("assistant").markdown(animated_output,unsafe_allow_html=True ):
45
  st.markdown(animated_output,unsafe_allow_html=True)
46
- apiKey = "AIzaSyAXkkcrrUBjPEgj93tZ9azy7zcS1wI1jUA"
47
  msgs = StreamlitChatMessageHistory(key="special_app_key")
48
 
49
  memory = ConversationBufferMemory(memory_key="history", chat_memory=msgs)
 
7
  from langchain.memory.chat_message_histories import StreamlitChatMessageHistory
8
  from streamlit_chat import message
9
  import time
10
+ import random
11
+ import os
12
+ api = os.environ.getattribute("API_TOKEN")
13
+
14
  def text():
15
  st.markdown("""
16
  <style>
 
46
 
47
  with st.chat_message("assistant").markdown(animated_output,unsafe_allow_html=True ):
48
  st.markdown(animated_output,unsafe_allow_html=True)
49
+ apiKey = api
50
  msgs = StreamlitChatMessageHistory(key="special_app_key")
51
 
52
  memory = ConversationBufferMemory(memory_key="history", chat_memory=msgs)