Spaces:
Sleeping
Sleeping
Download main.py from SpacesExamples/secret-example: direct link, hf CLI and curl.
- Browser
- Download file 253 Bytes
-
https://huggingface.co/spaces/SpacesExamples/secret-example/resolve/main/main.py
- Command line
-
hf download hf://spaces/SpacesExamples/secret-example/main.py
-
curl -L -o main.py https://huggingface.co/spaces/SpacesExamples/secret-example/resolve/main/main.py
253 Bytes
| from typing import Union | |
| from fastapi import FastAPI | |
| import os | |
| app = FastAPI() | |
| def read_root(): | |
| return {"Hello EXAMPLE": os.environ.get("EXAMPLE"), | |
| "Hello SECRET_EXAMPLE": os.environ.get("SECRET_EXAMPLE") | |
| } | |