Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2325,20 +2325,20 @@ def process_pdf():
|
|
2325 |
#image_paths = await convert_pdf_to_images_async(saved_pdf_path)
|
2326 |
|
2327 |
#updating logic here [Dev Patel]
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
|
2338 |
-
|
2339 |
|
2340 |
-
|
2341 |
-
final_project_json = project_skeleton
|
2342 |
|
2343 |
# Save the *final* filled project JSON, overwriting the skeleton
|
2344 |
with open(project_output, "w") as f:
|
|
|
2325 |
#image_paths = await convert_pdf_to_images_async(saved_pdf_path)
|
2326 |
|
2327 |
#updating logic here [Dev Patel]
|
2328 |
+
initial_state_dict = {
|
2329 |
+
"project_json": project_skeleton,
|
2330 |
+
"description": "The pseudo code for the script",
|
2331 |
+
"project_id": project_id,
|
2332 |
+
"project_image": img_b64,
|
2333 |
+
"action_plan": {},
|
2334 |
+
"pseudo_code": {},
|
2335 |
+
"temporary_node": {},
|
2336 |
+
}
|
2337 |
|
2338 |
+
final_state_dict = app_graph.invoke(initial_state_dict) # Pass dictionary
|
2339 |
|
2340 |
+
final_project_json = final_state_dict['project_json'] # Access as dict
|
2341 |
+
#final_project_json = project_skeleton
|
2342 |
|
2343 |
# Save the *final* filled project JSON, overwriting the skeleton
|
2344 |
with open(project_output, "w") as f:
|