prthm11 commited on
Commit
c84e191
·
verified ·
1 Parent(s): c814274

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -2228,20 +2228,21 @@ def process_pdf():
2228
  #image_paths = await convert_pdf_to_images_async(saved_pdf_path)
2229
 
2230
  #updating logic here [Dev Patel]
2231
- initial_state_dict = {
2232
- "project_json": project_skeleton,
2233
- "description": "The pseudo code for the script",
2234
- "project_id": project_id,
2235
- "project_image": img_b64,
2236
- "action_plan": {},
2237
- "pseudo_code": {},
2238
- "temporary_node": {},
2239
- }
2240
 
2241
- final_state_dict = app_graph.invoke(initial_state_dict) # Pass dictionary
2242
-
2243
- final_project_json = final_state_dict['project_json'] # Access as dict
2244
 
 
 
 
2245
  # Save the *final* filled project JSON, overwriting the skeleton
2246
  with open(project_output, "w") as f:
2247
  json.dump(final_project_json, f, indent=2)
 
2228
  #image_paths = await convert_pdf_to_images_async(saved_pdf_path)
2229
 
2230
  #updating logic here [Dev Patel]
2231
+ # initial_state_dict = {
2232
+ # "project_json": project_skeleton,
2233
+ # "description": "The pseudo code for the script",
2234
+ # "project_id": project_id,
2235
+ # "project_image": img_b64,
2236
+ # "action_plan": {},
2237
+ # "pseudo_code": {},
2238
+ # "temporary_node": {},
2239
+ # }
2240
 
2241
+ # final_state_dict = app_graph.invoke(initial_state_dict) # Pass dictionary
 
 
2242
 
2243
+ # final_project_json = final_state_dict['project_json'] # Access as dict
2244
+ final_project_json = project_skeleton
2245
+
2246
  # Save the *final* filled project JSON, overwriting the skeleton
2247
  with open(project_output, "w") as f:
2248
  json.dump(final_project_json, f, indent=2)