Spaces:
Runtime error
Runtime error
from fastapi import FastAPI, Body | |
from uvicorn import run | |
from utils import predict | |
app = FastAPI() | |
async def resolvePost(data = Body()): | |
return await predict(data["url"]) | |
async def resolveGet(url: str): | |
return await predict(url) | |
run(app, host="0.0.0.0", port=7860) |