Spaces:
Paused
Paused
File size: 337 Bytes
072ce62 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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()
|