Spaces:
Runtime error
Runtime error
Upload api\test_app.py with huggingface_hub
Browse files- api//test_app.py +11 -0
api//test_app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
|
| 3 |
+
app = FastAPI()
|
| 4 |
+
|
| 5 |
+
@app.get("/")
|
| 6 |
+
def read_root():
|
| 7 |
+
return {"Hello": "World"}
|
| 8 |
+
|
| 9 |
+
@app.get("/health")
|
| 10 |
+
def health():
|
| 11 |
+
return {"status": "ok"}
|