Update app.py
Browse files
app.py
CHANGED
|
@@ -986,10 +986,12 @@ If you find any "Code-Blocks" then,
|
|
| 986 |
|
| 987 |
# Update the original action_plan in the state with the refined version
|
| 988 |
state["pseudo_code"] = result
|
| 989 |
-
|
|
|
|
| 990 |
# with open("debug_state.json", "w", encoding="utf-8") as f:
|
| 991 |
# json.dump(state, f, indent=2, ensure_ascii=False)
|
| 992 |
print(f"[OVREALL REFINED PSEUDO CODE LOGIC]: {result}")
|
|
|
|
| 993 |
logger.info("Plan refinement and block relation analysis completed for all plans.")
|
| 994 |
return state
|
| 995 |
# Node 2: planner node
|
|
@@ -2605,10 +2607,9 @@ def process_pdf():
|
|
| 2605 |
"action_plan": {},
|
| 2606 |
"pseudo_code": {},
|
| 2607 |
"temporary_node": {},
|
| 2608 |
-
"temporary_node": {},
|
| 2609 |
"processing":True,
|
| 2610 |
"page_count": 0,
|
| 2611 |
-
"temp_pseudo_code":
|
| 2612 |
}
|
| 2613 |
|
| 2614 |
final_state_dict = app_graph.invoke(initial_state_dict) # Pass dictionary
|
|
|
|
| 986 |
|
| 987 |
# Update the original action_plan in the state with the refined version
|
| 988 |
state["pseudo_code"] = result
|
| 989 |
+
state["temp_pseudo_code"] += [result]
|
| 990 |
+
Data = state["temp_pseudo_code"]
|
| 991 |
# with open("debug_state.json", "w", encoding="utf-8") as f:
|
| 992 |
# json.dump(state, f, indent=2, ensure_ascii=False)
|
| 993 |
print(f"[OVREALL REFINED PSEUDO CODE LOGIC]: {result}")
|
| 994 |
+
print(f"[OVREALL LISTS OF LOGICS]: {Data}")
|
| 995 |
logger.info("Plan refinement and block relation analysis completed for all plans.")
|
| 996 |
return state
|
| 997 |
# Node 2: planner node
|
|
|
|
| 2607 |
"action_plan": {},
|
| 2608 |
"pseudo_code": {},
|
| 2609 |
"temporary_node": {},
|
|
|
|
| 2610 |
"processing":True,
|
| 2611 |
"page_count": 0,
|
| 2612 |
+
"temp_pseudo_code":[],
|
| 2613 |
}
|
| 2614 |
|
| 2615 |
final_state_dict = app_graph.invoke(initial_state_dict) # Pass dictionary
|