Server mode
Get Endpoint via Float16
Step 1 : Prepare Your Script
import os
import uvicorn
import asyncio
from fastapi import FastAPI
from fastapi.responses import JSONResponse
from utils import *
app = FastAPI()
@app.get("/hello")
async def read_root():
return {"message": f"{say_hello() say_world()}"}
async def main():
config = uvicorn.Config(
app, host="0.0.0.0", port=int(os.environ["PORT"])
)
server = uvicorn.Server(config)
await server.serve()Step 2 : Create project
Resulting Files
Step 3 : Deploy Script
Step 4 : Endpoint Request

Explore More
Last updated