Download create_breaking_table.py from UNIARC/UNIARC1: direct link, hf CLI and curl.
- Browser
- Download file 364 Bytes
-
https://huggingface.co/spaces/UNIARC/UNIARC1/resolve/main/create_breaking_table.py
- Command line
-
hf download hf://spaces/UNIARC/UNIARC1/create_breaking_table.py
-
curl -L -o create_breaking_table.py https://huggingface.co/spaces/UNIARC/UNIARC1/resolve/main/create_breaking_table.py
364 Bytes
| from src.database.models import Base, engine, BreakingNews | |
| try: | |
| BreakingNews.__table__.create(bind=engine) | |
| print("BreakingNews table created successfully.") | |
| except Exception as e: | |
| print(f"Error creating table: {e}") | |
| from sqlalchemy import inspect | |
| inspector = inspect(engine) | |
| print("Updated Tables in database:", inspector.get_table_names()) | |