Spaces:
Runtime error
Runtime error
Download script/graph.py from whosouravsharma/paper-qa-rag: direct link, hf CLI and curl.
- Browser
- Download file 543 Bytes
-
https://huggingface.co/spaces/whosouravsharma/paper-qa-rag/resolve/main/script/graph.py
- Command line
-
hf download hf://spaces/whosouravsharma/paper-qa-rag/script/graph.py
-
curl -L -o graph.py https://huggingface.co/spaces/whosouravsharma/paper-qa-rag/resolve/main/script/graph.py
543 Bytes
| # LangGraph definition: retrieval only. Generation moved to the Gradio + | |
| # ZeroGPU UI Space (see PLAN.md's "Inference architecture" section) since | |
| # ZeroGPU only runs inside a Gradio Space process, not a remote backend call. | |
| from langgraph.graph import StateGraph, END | |
| from script.state import GraphState | |
| from script.retriever import retrieve | |
| def build_graph(): | |
| graph = StateGraph(GraphState) | |
| graph.add_node("retrieve", retrieve) | |
| graph.set_entry_point("retrieve") | |
| graph.add_edge("retrieve", END) | |
| return graph.compile() | |