-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (23 loc) · 759 Bytes
/
main.py
File metadata and controls
35 lines (23 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from graph.workflow import build_workflow
import json
def run():
app = build_workflow()
with open("data/sample_inputs.json") as f:
data = json.load(f)
input_text = data[0]["input"]
result = app.invoke({"input": input_text})
print("\n================ FINAL RESULT ================\n")
print("Tasks:")
print(result.get("tasks"))
print("\nSteps:")
print(result.get("steps"))
print("\nValidation Status:")
print(result.get("status"))
if result.get("status") == "FAIL":
print("\nIssues:")
print(result.get("issues"))
print("\nFixes:")
print(result.get("recovery"))
print("\n=============================================\n")
if __name__ == "__main__":
run()