Spaces:
Sleeping
Sleeping
Download database/__init__.py from dev-haresh/nexus-ai: direct link, hf CLI and curl.
- Browser
- Download file 258 Bytes
-
https://huggingface.co/spaces/dev-haresh/nexus-ai/resolve/main/database/__init__.py
- Command line
-
hf download hf://spaces/dev-haresh/nexus-ai/database/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/dev-haresh/nexus-ai/resolve/main/database/__init__.py
258 Bytes
| from flask_sqlalchemy import SQLAlchemy | |
| from flask_migrate import Migrate | |
| db = SQLAlchemy() | |
| migrate = Migrate() | |
| def init_db(app): | |
| db.init_app(app) | |
| migrate.init_app(app, db) | |
| with app.app_context(): | |
| import models | |
| db.create_all() | |