Spaces:
Sleeping
Sleeping
Download server/src/components/run_graph.py from VashuTheGreat2/ML-Learner: direct link, hf CLI and curl.
- Browser
- Download file 563 Bytes
-
https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/server/src/components/run_graph.py
- Command line
-
hf download hf://spaces/VashuTheGreat2/ML-Learner/server/src/components/run_graph.py
-
curl -L -o run_graph.py https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/server/src/components/run_graph.py
563 Bytes
| from src.graphs.multi_rag_graph_builder import graph | |
| from src.utils.asyncHandler import asyncHandler | |
| import logging | |
| class RunGraph: | |
| def __init__(self): | |
| pass | |
| async def run(self, state: dict, config: dict = None) -> dict: | |
| logging.info("Starting RunGraph component execution...") | |
| if config is None: | |
| config = {"configurable": {"thread_id": "default_thread"}} | |
| result = await graph.ainvoke(state, config=config) | |
| logging.info("RunGraph component execution completed.") | |
| return result |