paper-qa-rag / script /graph.py
whosouravsharma's picture
Upload folder using huggingface_hub
2febe44 verified
Raw History Blame Contribute Delete
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()