Update app.py
Browse files
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 |
-
|
| 108 |
-
|
| 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 |
|