lakshmivairamani commited on
Commit
fe4014e
·
verified ·
1 Parent(s): 95cd543

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -19,7 +19,12 @@ load_dotenv()
19
 
20
  # Get the path to the vector database
21
  vector_db_path_documents = os.getenv('VECTOR_DB_PATH_DOCUMENTS')
 
22
 
 
 
 
 
23
  # Mount static files
24
  app.mount("/static", StaticFiles(directory="static"), name="static")
25
 
 
19
 
20
  # Get the path to the vector database
21
  vector_db_path_documents = os.getenv('VECTOR_DB_PATH_DOCUMENTS')
22
+ import os
23
 
24
+ # Ensure the directory for the log file exists
25
+ log_directory = os.path.dirname("api.log")
26
+ if not os.path.exists(log_directory):
27
+ os.makedirs(log_directory)
28
  # Mount static files
29
  app.mount("/static", StaticFiles(directory="static"), name="static")
30