nikhmr1235 commited on
Commit
27dd211
·
verified ·
1 Parent(s): 91470c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -61,7 +61,9 @@ workflow.add_edge("post_code_review_node", "update_review_body_based_on_human_in
61
  workflow.add_edge("update_review_body_based_on_human_input_node", END)
62
 
63
  # Define the path for the SQLite database file
64
- SQLITE_DB_PATH = "langgraph_checkpoints.sqlite"
 
 
65
 
66
  # --- Checkpointer and Graph Compilation ---
67
  global_memory_saver = None # Initialize to None
@@ -72,6 +74,7 @@ try:
72
  #os.makedirs(os.path.dirname(SQLITE_DB_PATH), exist_ok=True)
73
 
74
  # Use check_same_thread=False for Gradio/web apps that might access the DB from different threads
 
75
  conn = sqlite3.connect(SQLITE_DB_PATH, check_same_thread=False)
76
  global_memory_saver = SqliteSaver(conn=conn)
77
  print(f"SqliteSaver initialized successfully: {type(global_memory_saver)}") # ADD THIS LINE
 
61
  workflow.add_edge("update_review_body_based_on_human_input_node", END)
62
 
63
  # Define the path for the SQLite database file
64
+ #SQLITE_DB_PATH = "langgraph_checkpoints.sqlite"
65
+ SQLITE_DB_PATH = os.path.join(os.getcwd(), "langgraph_checkpoints.sqlite")
66
+
67
 
68
  # --- Checkpointer and Graph Compilation ---
69
  global_memory_saver = None # Initialize to None
 
74
  #os.makedirs(os.path.dirname(SQLITE_DB_PATH), exist_ok=True)
75
 
76
  # Use check_same_thread=False for Gradio/web apps that might access the DB from different threads
77
+ print(os.getcwd())
78
  conn = sqlite3.connect(SQLITE_DB_PATH, check_same_thread=False)
79
  global_memory_saver = SqliteSaver(conn=conn)
80
  print(f"SqliteSaver initialized successfully: {type(global_memory_saver)}") # ADD THIS LINE