vmalapaka commited on
Commit
4d18f0f
·
verified ·
1 Parent(s): 5b35737

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,7 +24,7 @@ st.sidebar.title("API")
24
  st.session_state['API_Key'] = st.sidebar.text_input("Enter you API key",type = "password")
25
  summarise_button = st.sidebar.button("Summarise",key = "summarise")
26
  if summarise_button:
27
- summarise_placeholder = st.sidebar.write("Thanks for chatting \n\n"+"Hi Friend")
28
 
29
  response_container = st.container()
30
  container = st.container()
@@ -44,7 +44,7 @@ def get_response(User_input,api_key):
44
  st.session_state['conversation'] = ConversationChain(
45
  llm=llm,
46
  verbose=True,
47
- memory=ConversationBufferMemory()
48
  )
49
 
50
  response = st.session_state['conversation'].predict(input=User_input)
 
24
  st.session_state['API_Key'] = st.sidebar.text_input("Enter you API key",type = "password")
25
  summarise_button = st.sidebar.button("Summarise",key = "summarise")
26
  if summarise_button:
27
+ summarise_placeholder = st.sidebar.write("Thanks for chatting \n\n"+st.session_state['conversation'].memory.buffer)
28
 
29
  response_container = st.container()
30
  container = st.container()
 
44
  st.session_state['conversation'] = ConversationChain(
45
  llm=llm,
46
  verbose=True,
47
+ memory=ConversationSummaryMemory(llm=llm)
48
  )
49
 
50
  response = st.session_state['conversation'].predict(input=User_input)