Spaces:
Sleeping
Sleeping
Download api/test.py from thesis-sd3a/digital-art-api: direct link, hf CLI and curl.
- Browser
- Download file 425 Bytes
-
https://huggingface.co/spaces/thesis-sd3a/digital-art-api/resolve/refs%2Fpr%2F4/api/test.py
- Command line
-
hf download hf://spaces/thesis-sd3a/digital-art-api@refs/pr/4/api/test.py
-
curl -L -o test.py https://huggingface.co/spaces/thesis-sd3a/digital-art-api/resolve/refs%2Fpr%2F4/api/test.py
425 Bytes
| import base64 | |
| from fastapi import APIRouter | |
| router = APIRouter() | |
| async def root(): | |
| return {"message": "Hello World"} | |
| async def say_hello(name: str): | |
| return {"message": f"Hello {name}"} | |
| # with open("C:\\Users\\mendo\\Downloads\\643662567_1310948180867431_7223931227735271979_n.jpg", "rb") as f: | |
| # encoded = base64.b64encode(f.read()).decode() | |
| # | |
| # print(encoded) |