Spaces:
Paused
Paused
File size: 322 Bytes
1633776 4d91450 1633776 04d2623 1633776 04d2623 1633776 04d2623 1633776 4d91450 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from fastapi import FastAPI
import asyncio
import uvicorn
from bot import start_bot
app = FastAPI()
@app.on_event("startup")
async def startup():
asyncio.create_task(start_bot())
@app.get("/")
async def root():
return {"status": "ok"}
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=7860)
|