Spaces:
Running
on
T4
Running
on
T4
Commit
·
64abd1e
1
Parent(s):
29a0692
pushed
Browse files
app.py
CHANGED
|
@@ -124,6 +124,10 @@ def face_swap_and_enhance(src_img, tgt_img):
|
|
| 124 |
# FastAPI REST API
|
| 125 |
# -------------------------------------------------
|
| 126 |
api = FastAPI()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
@api.post("/api/faceswap")
|
| 129 |
async def faceswap(src_img: UploadFile = File(...), tgt_img: UploadFile = File(...)):
|
|
|
|
| 124 |
# FastAPI REST API
|
| 125 |
# -------------------------------------------------
|
| 126 |
api = FastAPI()
|
| 127 |
+
# Add this to your app.py in the FastAPI section
|
| 128 |
+
@api.get("/api/health")
|
| 129 |
+
async def health_check():
|
| 130 |
+
return {"status": "healthy", "message": "FaceSwap API is running"}
|
| 131 |
|
| 132 |
@api.post("/api/faceswap")
|
| 133 |
async def faceswap(src_img: UploadFile = File(...), tgt_img: UploadFile = File(...)):
|