Spaces:
Running
Running
Download graph.py from arnavmishra4/NeuroBio_Agent: direct link, hf CLI and curl.
- Browser
- Download file 457 Bytes
-
https://huggingface.co/spaces/arnavmishra4/NeuroBio_Agent/resolve/main/graph.py
- Command line
-
hf download hf://spaces/arnavmishra4/NeuroBio_Agent/graph.py
-
curl -L -o graph.py https://huggingface.co/spaces/arnavmishra4/NeuroBio_Agent/resolve/main/graph.py
457 Bytes
| from langgraph.graph import StateGraph, END | |
| from state import AgentState | |
| from nodes import call_llm, run_tools, should_continue | |
| graph = StateGraph(AgentState) | |
| graph.add_node("llm", call_llm) | |
| graph.add_node("tools", run_tools) | |
| graph.set_entry_point("llm") | |
| graph.add_conditional_edges( | |
| "llm", | |
| should_continue, | |
| { | |
| "tools": "tools", | |
| "end": END, | |
| }, | |
| ) | |
| graph.add_edge("tools", "llm") | |
| agent = graph.compile() |