Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Haride
/
HelloHF
like
0
Running
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
HelloHF
/
app.py
Haride
Update app.py
6f69689
verified
about 1 month ago
raw
Copy download link
history
blame
contribute
delete
Safe
255 Bytes
from
fastapi
import
FastAPI, Response
app = FastAPI()
@app.get(
"/"
)
def
greet_json
():
return
{
"Hello"
:
"World!"
}
@app.get(
"/health"
)
def
health
():
return
{
"ok"
:
True
}
@app.head(
"/health"
)
def
health_head
():
return
Response(status_code=
200
)