Writo commited on
Commit
e4d76d3
·
1 Parent(s): 8be95ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -74,10 +74,11 @@ def main():
74
  # Clear the input
75
  st.session_state.query = ""
76
 
77
- # Display chat history
 
78
  for chat in st.session_state.chat_history:
79
- st.text(f"Q: {chat['question']}\nA: {chat['answer']}\n{chat['time']}")
80
- st.write("---")
81
 
82
  except Exception as e:
83
  logging.error(f"An error occurred: {e}")
 
74
  # Clear the input
75
  st.session_state.query = ""
76
 
77
+ # Display chat history in a text area
78
+ history_text = ""
79
  for chat in st.session_state.chat_history:
80
+ history_text += f"Q: {chat['question']}\nA: {chat['answer']}\n{chat['time']}\n---\n"
81
+ st.text_area("Chat History", history_text, height=300)
82
 
83
  except Exception as e:
84
  logging.error(f"An error occurred: {e}")