Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2881,21 +2881,21 @@ def process_pdf():
|
|
| 2881 |
images = convert_from_path(pdf_stream, dpi=300)
|
| 2882 |
|
| 2883 |
#updating logic here [Dev Patel]
|
| 2884 |
-
initial_state_dict = {
|
| 2885 |
-
|
| 2886 |
-
|
| 2887 |
-
|
| 2888 |
-
|
| 2889 |
-
|
| 2890 |
-
|
| 2891 |
-
|
| 2892 |
-
|
| 2893 |
-
}
|
| 2894 |
|
| 2895 |
-
final_state_dict = app_graph.invoke(initial_state_dict) # Pass dictionary
|
| 2896 |
|
| 2897 |
-
final_project_json = final_state_dict['project_json'] # Access as dict
|
| 2898 |
-
|
| 2899 |
|
| 2900 |
# Save the *final* filled project JSON, overwriting the skeleton
|
| 2901 |
with open(project_output, "w") as f:
|
|
|
|
| 2881 |
images = convert_from_path(pdf_stream, dpi=300)
|
| 2882 |
|
| 2883 |
#updating logic here [Dev Patel]
|
| 2884 |
+
# initial_state_dict = {
|
| 2885 |
+
# "project_json": project_skeleton,
|
| 2886 |
+
# "description": "The pseudo code for the script",
|
| 2887 |
+
# "project_id": project_id,
|
| 2888 |
+
# # "project_image": img_b64,
|
| 2889 |
+
# "project_image": images,
|
| 2890 |
+
# "action_plan": {},
|
| 2891 |
+
# "pseudo_code": {},
|
| 2892 |
+
# "temporary_node": {},
|
| 2893 |
+
# }
|
| 2894 |
|
| 2895 |
+
# final_state_dict = app_graph.invoke(initial_state_dict) # Pass dictionary
|
| 2896 |
|
| 2897 |
+
# final_project_json = final_state_dict['project_json'] # Access as dict
|
| 2898 |
+
final_project_json = project_skeleton
|
| 2899 |
|
| 2900 |
# Save the *final* filled project JSON, overwriting the skeleton
|
| 2901 |
with open(project_output, "w") as f:
|