AashitaK commited on
Commit
9ad1fac
·
verified ·
1 Parent(s): f985285

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -3,7 +3,11 @@ from utils.chatbot_interface4 import ChatbotInterface
3
  # from utils.session_history2 import ChatbotInterface
4
 
5
  # Configure logging to both file and console
6
- log_file_path = "logs/chatbot.log"
 
 
 
 
7
  logging.basicConfig(
8
  level=logging.INFO,
9
  format="%(asctime)s - %(levelname)s - %(message)s",
 
3
  # from utils.session_history2 import ChatbotInterface
4
 
5
  # Configure logging to both file and console
6
+ log_directory = "logs"
7
+ if not os.path.exists(log_directory):
8
+ os.makedirs(log_directory)
9
+ log_file_path = os.path.join(log_directory, "chatbot.log")
10
+
11
  logging.basicConfig(
12
  level=logging.INFO,
13
  format="%(asctime)s - %(levelname)s - %(message)s",