Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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"+
|
| 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=
|
| 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)
|