shukdevdatta123 commited on
Commit
ae0fdda
·
verified ·
1 Parent(s): ac53ddd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -104,12 +104,8 @@ if option == "Ask a Question":
104
  # View previous conversations
105
  elif option == "View Previous Conversations":
106
  if os.path.exists(conversation_file):
107
- try:
108
- with open(conversation_file, "r", encoding="utf-8", errors="replace") as file:
109
- content = file.read()
110
- st.text_area("Previous Conversations", content, height=300)
111
- except Exception as e:
112
- st.error(f"An error occurred while reading the file: {e}")
113
  else:
114
  st.warning("No previous conversations found.")
115
 
 
104
  # View previous conversations
105
  elif option == "View Previous Conversations":
106
  if os.path.exists(conversation_file):
107
+ with open(conversation_file, "r") as file:
108
+ st.text_area("Previous Conversations", file.read(), height=300)
 
 
 
 
109
  else:
110
  st.warning("No previous conversations found.")
111