Spaces:
Sleeping
Sleeping
Download modules/app.py from IsidoreSong/fastapi-uvicorn: direct link, hf CLI and curl.
- Browser
- Download file 590 Bytes
-
https://huggingface.co/spaces/IsidoreSong/fastapi-uvicorn/resolve/main/modules/app.py
- Command line
-
hf download hf://spaces/IsidoreSong/fastapi-uvicorn/modules/app.py
-
curl -L -o app.py https://huggingface.co/spaces/IsidoreSong/fastapi-uvicorn/resolve/main/modules/app.py
590 Bytes
| import os | |
| import requests | |
| import json | |
| from io import BytesIO | |
| from fastapi import FastAPI | |
| from fastapi.staticfiles import StaticFiles | |
| from fastapi.responses import FileResponse, StreamingResponse | |
| # https://huggingface.co/settings/tokens | |
| # https://huggingface.co/spaces/{username}/{space}/settings | |
| API_TOKEN = os.getenv("BIG_GAN_TOKEN") | |
| app = FastAPI(docs_url=None, redoc_url=None) | |
| app.mount("/static", StaticFiles(directory="static"), name="static") | |
| def index(): | |
| return 4 | |
| def biggan(input): | |
| output = 5 | |
| return output | |