Spaces:
Running
Running
| from fastapi import FastAPI | |
| from fastapi.staticfiles import StaticFiles | |
| from fastapi.responses import FileResponse | |
| import uvicorn | |
| from app import watermelon | |
| app = FastAPI() | |
| app.include_router(watermelon.router) | |
| app.mount("/", StaticFiles(directory="static", html=True), name="static") | |
| def index() -> FileResponse: | |
| return FileResponse(path="static/index.html", media_type="text/html") | |
| if __name__ == "__main__": | |
| uvicorn.run(app, host="127.0.0.1", port=8000) | |