Mohammad Haghir commited on
Commit
a18d877
·
1 Parent(s): 865a192

tool update

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -92,7 +92,11 @@ class BasicAgent:
92
  builder.add_edge(START, "agent")
93
  builder.add_conditional_edges("agent", tools_condition, ["agent", END])
94
  builder.add_edge("agent", END)
95
- return builder.compile()
 
 
 
 
96
 
97
 
98
  def run_and_submit_all( profile: gr.OAuthProfile | None):
 
92
  builder.add_edge(START, "agent")
93
  builder.add_conditional_edges("agent", tools_condition, ["agent", END])
94
  builder.add_edge("agent", END)
95
+ graph = builder.compile()
96
+ image = graph.get_graph().draw_mermaid_png()
97
+ with open("output_graph.png", "wb") as file:
98
+ file.write(image)
99
+ return graph
100
 
101
 
102
  def run_and_submit_all( profile: gr.OAuthProfile | None):