Update app.py
Browse files
app.py
CHANGED
@@ -116,11 +116,16 @@ elif option == "View Previous Conversations":
|
|
116 |
# View data summary
|
117 |
elif option == "View Data Summary":
|
118 |
if os.path.exists(summary_file):
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
121 |
else:
|
122 |
st.warning("No data summary found.")
|
123 |
|
|
|
124 |
# Save a note
|
125 |
elif option == "Save a Note":
|
126 |
note = st.text_input("Enter a note to save:")
|
|
|
116 |
# View data summary
|
117 |
elif option == "View Data Summary":
|
118 |
if os.path.exists(summary_file):
|
119 |
+
try:
|
120 |
+
with open(summary_file, "r", encoding="utf-8", errors="replace") as file:
|
121 |
+
content = file.read()
|
122 |
+
st.text_area("Data Summary", content, height=300)
|
123 |
+
except Exception as e:
|
124 |
+
st.error(f"An error occurred while reading the file: {e}")
|
125 |
else:
|
126 |
st.warning("No data summary found.")
|
127 |
|
128 |
+
|
129 |
# Save a note
|
130 |
elif option == "Save a Note":
|
131 |
note = st.text_input("Enter a note to save:")
|