selim-ba commited on
Commit
de97262
·
verified ·
1 Parent(s): 50b50f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -48,6 +48,7 @@ class AgentState(TypedDict):
48
 
49
  class SuperSmartAgent:
50
  def __init__(self):
 
51
  self.graph = self._build_graph()
52
 
53
  def _build_graph(self):
@@ -153,7 +154,7 @@ class SuperSmartAgent:
153
  print(f"[DEBUG] file_name from state: {file_name!r}")
154
 
155
  if file_name and file_name.endswith(".py"):
156
- file_path = os.path.join("data", file_name)
157
  print(f"[DEBUG] Attempting to open Python file at: {file_path}")
158
  try:
159
  with open(file_path, "r") as f:
 
48
 
49
  class SuperSmartAgent:
50
  def __init__(self):
51
+ os.chdir(os.path.dirname(os.path.abspath(__file__)))
52
  self.graph = self._build_graph()
53
 
54
  def _build_graph(self):
 
154
  print(f"[DEBUG] file_name from state: {file_name!r}")
155
 
156
  if file_name and file_name.endswith(".py"):
157
+ file_path = file_name
158
  print(f"[DEBUG] Attempting to open Python file at: {file_path}")
159
  try:
160
  with open(file_path, "r") as f: