Spaces:
Sleeping
Sleeping
Keep and display chat history
Browse files
app.py
CHANGED
|
@@ -49,6 +49,9 @@ if st.button("Submit"):
|
|
| 49 |
)
|
| 50 |
|
| 51 |
answer = completion.choices[0].message['content']
|
|
|
|
| 52 |
st.write(f"Adrega AI: {answer}")
|
| 53 |
else:
|
| 54 |
st.write("Please enter a question.")
|
|
|
|
|
|
|
|
|
| 49 |
)
|
| 50 |
|
| 51 |
answer = completion.choices[0].message['content']
|
| 52 |
+
st.session_state.conversation += f"User: {user_input}\nAdrega AI: {answer}\n\n"
|
| 53 |
st.write(f"Adrega AI: {answer}")
|
| 54 |
else:
|
| 55 |
st.write("Please enter a question.")
|
| 56 |
+
|
| 57 |
+
st.text_area("Conversation History", value=st.session_state.conversation, height=300, max_chars=None)
|