naman1102 commited on
Commit
99b84e4
·
1 Parent(s): d0729af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -79,10 +79,10 @@ graph.add_conditional_edges(
79
  "final": END, # if route_agent(...) == "final", transition to END
80
  }
81
  )
82
-
83
  def respond_to_input(user_input: str) -> str:
84
  initial_state: AgentState = {"messages": []}
85
- return graph.run(initial_state, user_input)
86
 
87
 
88
 
 
79
  "final": END, # if route_agent(...) == "final", transition to END
80
  }
81
  )
82
+ compiled_graph = graph.compile()
83
  def respond_to_input(user_input: str) -> str:
84
  initial_state: AgentState = {"messages": []}
85
+ return compiled_graph.invoke(initial_state, user_input)
86
 
87
 
88