Spaces:
Runtime error
Runtime error
Download database.py from xclasscode/sentiment_analyzer: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/spaces/xclasscode/sentiment_analyzer/resolve/main/database.py
- Command line
-
hf download hf://spaces/xclasscode/sentiment_analyzer/database.py
-
curl -L -o database.py https://huggingface.co/spaces/xclasscode/sentiment_analyzer/resolve/main/database.py
382 Bytes
| from sqlalchemy import create_engine | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import sessionmaker | |
| SQLALCHEMY_DATABASE_URL = "sqlite:///./app.db" | |
| engine = create_engine( | |
| SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} | |
| ) | |
| SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) | |
| Base = declarative_base() | |