Download ops/logistic_flutter/streamlit/init_database.py from MouleeswaranM/FairRelay: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/MouleeswaranM/FairRelay/resolve/refs%2Fpr%2F2/ops/logistic_flutter/streamlit/init_database.py
- Command line
-
hf download hf://MouleeswaranM/FairRelay@refs/pr/2/ops/logistic_flutter/streamlit/init_database.py
-
curl -L -o init_database.py https://huggingface.co/MouleeswaranM/FairRelay/resolve/refs%2Fpr%2F2/ops/logistic_flutter/streamlit/init_database.py
1.06 kB
| """ | |
| Database Initialization Script | |
| Run this once to create all tables and populate with sample data | |
| """ | |
| import sys | |
| from pathlib import Path | |
| sys.path.append(str(Path(__file__).parent)) | |
| from utils.database import init_database | |
| def main(): | |
| print("๐ Initializing Women Empowerment Hub Database...") | |
| print("=" * 60) | |
| success = init_database() | |
| if success: | |
| print("\nโ Database initialized successfully!") | |
| print("\n๐ All tables created:") | |
| print(" - users") | |
| print(" - jobs") | |
| print(" - courses") | |
| print(" - success_stories") | |
| print(" - resources") | |
| print(" - mentors") | |
| print(" - community_posts") | |
| print(" - emergency_contacts") | |
| print(" - health_records") | |
| print(" - legal_rights") | |
| print("\n๐ You're all set! Run 'streamlit run streamlit_app.py' to start the app.") | |
| else: | |
| print("\nโ Database initialization failed. Please check your DATABASE_URL in .env file.") | |
| if __name__ == "__main__": | |
| main() | |