Spaces:
Sleeping
Sleeping
Download backend/init_db.py from Lijoice/StockScout: direct link, hf CLI and curl.
- Browser
- Download file 295 Bytes
-
https://huggingface.co/spaces/Lijoice/StockScout/resolve/main/backend/init_db.py
- Command line
-
hf download hf://spaces/Lijoice/StockScout/backend/init_db.py
-
curl -L -o init_db.py https://huggingface.co/spaces/Lijoice/StockScout/resolve/main/backend/init_db.py
295 Bytes
| from backend.database import engine, Base | |
| from backend.models import Stock, StockPrice, Sentiment, Prediction, User | |
| def init_db(): | |
| print("Creating database tables...") | |
| Base.metadata.create_all(bind=engine) | |
| print("Database tables created.") | |
| if __name__ == "__main__": | |
| init_db() | |