Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,7 +74,7 @@ SQLITE_DB_PATH = tempfile.gettempdir() + '/langgraph_checkpoints.sqlite'
|
|
| 74 |
|
| 75 |
# --- Checkpointer and Graph Compilation ---
|
| 76 |
global_memory_saver = None # Initialize to None
|
| 77 |
-
new_thread_id =
|
| 78 |
|
| 79 |
#----- thread_id is made global until below gradio issue is resolved
|
| 80 |
# gradio_issue: https://github.com/gradio-app/gradio/issues/10893
|
|
@@ -407,10 +407,12 @@ async def resume_review(payload: HumanInputPayload):
|
|
| 407 |
last_error = final_state_values["last_error"]
|
| 408 |
|
| 409 |
if last_error is not None:
|
| 410 |
-
print(f"final_review_id:{final_review_id}\nfinal_review_url:{final_review_url}")
|
| 411 |
-
else:
|
| 412 |
print(f"Encountered error:{last_error} during graph execution")
|
| 413 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 414 |
|
| 415 |
except Exception as e:
|
| 416 |
print(f"An error occurred during graph resumption: {e}")
|
|
|
|
| 74 |
|
| 75 |
# --- Checkpointer and Graph Compilation ---
|
| 76 |
global_memory_saver = None # Initialize to None
|
| 77 |
+
new_thread_id = str(uuid.uuid4())
|
| 78 |
|
| 79 |
#----- thread_id is made global until below gradio issue is resolved
|
| 80 |
# gradio_issue: https://github.com/gradio-app/gradio/issues/10893
|
|
|
|
| 407 |
last_error = final_state_values["last_error"]
|
| 408 |
|
| 409 |
if last_error is not None:
|
|
|
|
|
|
|
| 410 |
print(f"Encountered error:{last_error} during graph execution")
|
| 411 |
+
return
|
| 412 |
+
else:
|
| 413 |
+
print(f"final_review_id:{final_review_id}\nfinal_review_url:{final_review_url}")
|
| 414 |
+
print("graph execution has completed successfully")
|
| 415 |
+
|
| 416 |
|
| 417 |
except Exception as e:
|
| 418 |
print(f"An error occurred during graph resumption: {e}")
|