Spaces:
Sleeping
Sleeping
from fastapi import FastAPI | |
from app.main import app | |
from app.models import Base | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker | |
engine = create_engine('sqlite:///database.db') | |
Base.metadata.create_all(engine) | |
Session = sessionmaker(bind=engine) | |
db = Session() | |
if __name__ == "__main__": | |
import uvicorn | |
uvicorn.run(app, host="0.0.0.0", port=8000) |