Download app/api/deps.py from Housable/LangChain: direct link, hf CLI and curl.
- Browser
- Download file 182 Bytes
-
https://huggingface.co/spaces/Housable/LangChain/resolve/main/app/api/deps.py
- Command line
-
hf download hf://spaces/Housable/LangChain/app/api/deps.py
-
curl -L -o deps.py https://huggingface.co/spaces/Housable/LangChain/resolve/main/app/api/deps.py
182 Bytes
| from typing import Generator | |
| from app.db.session import SessionLocal | |
| def get_db() -> Generator: | |
| try: | |
| db = SessionLocal() | |
| yield db | |
| finally: | |
| db.close() |