Spaces:
Runtime error
Runtime error
Download shell.py from zinoubm/openpdf-backend: direct link, hf CLI and curl.
- Browser
- Download file 582 Bytes
-
https://huggingface.co/spaces/zinoubm/openpdf-backend/resolve/main/shell.py
- Command line
-
hf download hf://spaces/zinoubm/openpdf-backend/shell.py
-
curl -L -o shell.py https://huggingface.co/spaces/zinoubm/openpdf-backend/resolve/main/shell.py
582 Bytes
| from IPython.terminal import embed | |
| from sqlalchemy.engine import create_engine | |
| from sqlalchemy.orm.session import sessionmaker | |
| from app.core.config import settings | |
| from app.models.user import User | |
| if __name__ == "__main__": | |
| engine = create_engine(settings.DATABASE_URL, future=True) | |
| SessionLocal = sessionmaker(bind=engine, autocommit=False, autoflush=False) | |
| terminal = embed.InteractiveShellEmbed() | |
| terminal.extension_manager.load_extension("autoreload") | |
| terminal.run_line_magic("autoreload", "2") | |
| db = SessionLocal(future=True) | |
| terminal.mainloop() | |