Spaces:
Sleeping
Sleeping
Download database.py from manabb/manabcommercial: direct link, hf CLI and curl.
- Browser
- Download file 451 Bytes
-
https://huggingface.co/spaces/manabb/manabcommercial/resolve/main/database.py
- Command line
-
hf download hf://spaces/manabb/manabcommercial/database.py
-
curl -L -o database.py https://huggingface.co/spaces/manabb/manabcommercial/resolve/main/database.py
451 Bytes
| from sqlalchemy import create_engine | |
| from sqlalchemy.orm import sessionmaker, DeclarativeBase | |
| class Base(DeclarativeBase): | |
| pass | |
| #SQLALCHEMY_DATABASE_URL = "sqlite:////data/manabCommercial1.db" | |
| SQLALCHEMY_DATABASE_URL = "sqlite:///./manabCommercial1.db" | |
| engine = create_engine(SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}) | |
| SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) | |
| # Base=DeclarativeBase() | |