Pavlo Kostianov commited on
Commit
29cc02b
·
1 Parent(s): fa85daa

Add debug lines

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -186,7 +186,7 @@ Rules:
186
  - Do NOT write import statements (pandas is already imported as pd).
187
  - Access all dataframes ONLY as df1["SheetName"] or df2["SheetName"].
188
  Never assign them to new variables like budget_df, property_df, etc.
189
- - Always put the answer in a variable named `result`.
190
  - Return ONLY Python code, nothing else.
191
  - If multiple values are tied for the maximum, include all of them in a list.
192
  - If result is numeric, round to 2 decimal places.
@@ -205,11 +205,13 @@ Rules:
205
  max_completion_tokens=1200
206
  )
207
  code = response.choices[0].message.content.strip()
208
-
209
  # Strip markdown fences if any
210
  if code.startswith("```"):
211
  code = code.strip("```").replace("python", "").strip()
212
 
 
 
 
213
  # Remove dangerous or irrelevant lines
214
  safe_lines = []
215
  for line in code.splitlines():
 
186
  - Do NOT write import statements (pandas is already imported as pd).
187
  - Access all dataframes ONLY as df1["SheetName"] or df2["SheetName"].
188
  Never assign them to new variables like budget_df, property_df, etc.
189
+ - ALWAYS put the answer in a variable named `result`.
190
  - Return ONLY Python code, nothing else.
191
  - If multiple values are tied for the maximum, include all of them in a list.
192
  - If result is numeric, round to 2 decimal places.
 
205
  max_completion_tokens=1200
206
  )
207
  code = response.choices[0].message.content.strip()
 
208
  # Strip markdown fences if any
209
  if code.startswith("```"):
210
  code = code.strip("```").replace("python", "").strip()
211
 
212
+ print("RAW GPT CODE:\n", code)
213
+ print("FULL RESPONSE:\n", response)
214
+
215
  # Remove dangerous or irrelevant lines
216
  safe_lines = []
217
  for line in code.splitlines():