cryogenic22 commited on
Commit
b2cc55f
·
verified ·
1 Parent(s): 13836e0

Update utils/file_handlers.py

Browse files
Files changed (1) hide show
  1. utils/file_handlers.py +4 -3
utils/file_handlers.py CHANGED
@@ -1,9 +1,10 @@
1
- # src/utils/file_handlers.py
2
 
3
  import json
4
  from datetime import datetime
5
  from pathlib import Path
6
- from ..config.settings import CHAT_HISTORIES_DIR, CHAT_IMAGES_DIR
 
7
 
8
  def save_chat_history(chat_history, image_data=None, filename=None):
9
  """Save chat history and associated image"""
@@ -81,5 +82,5 @@ def load_chat_history(filename):
81
 
82
  return chat_data, image_data
83
  except Exception as e:
84
- print(f"Error loading chat history: {e}")
85
  return None, None
 
1
+ # utils/file_handlers.py
2
 
3
  import json
4
  from datetime import datetime
5
  from pathlib import Path
6
+ import streamlit as st
7
+ from config.settings import CHAT_HISTORIES_DIR, CHAT_IMAGES_DIR
8
 
9
  def save_chat_history(chat_history, image_data=None, filename=None):
10
  """Save chat history and associated image"""
 
82
 
83
  return chat_data, image_data
84
  except Exception as e:
85
+ st.error(f"Error loading chat history: {str(e)}")
86
  return None, None