Spaces:
Paused
Paused
Download app.py from Rohithm16/test-for-cloud: direct link, hf CLI and curl.
- Browser
- Download file 308 Bytes
-
https://huggingface.co/spaces/Rohithm16/test-for-cloud/resolve/main/app.py
- Command line
-
hf download hf://spaces/Rohithm16/test-for-cloud/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Rohithm16/test-for-cloud/resolve/main/app.py
308 Bytes
| from fastapi import FastAPI | |
| from pydantic import BaseModel | |
| app = FastAPI() | |
| class Ping(BaseModel): | |
| message: str | |
| def root(): | |
| return {"status": "space is alive 🚀"} | |
| def echo(data: Ping): | |
| return { | |
| "you_sent": data.message, | |
| "working": True | |
| } | |