Spaces:
Paused
Paused
| import uvicorn | |
| from fastapi import FastAPI | |
| class Temp: | |
| def __init__(self): | |
| self.app = FastAPI() | |
| self.app.add_api_route("/", self.index, methods=["GET"]) | |
| async def index(self): | |
| return {"message": "Hello, World!"} | |
| def run(self): | |
| uvicorn.run(self.app, port=7860, workers=1) | |
| Temp().run() | |