Spaces:
Sleeping
Sleeping
Manav Sarkar
commited on
Commit
·
442d120
1
Parent(s):
65ae6d0
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ async def create_upload_file(contents: Base64Data):
|
|
| 35 |
res = DeepFace.analyze(img_path=contents, actions=['age', 'gender'])
|
| 36 |
df = DeepFace.find(img_path = contents, db_path = "dataset/",model_name ='GhostFaceNet', threshold=0.9)
|
| 37 |
print(df[0].head())
|
| 38 |
-
return JSONResponse(content={"
|
| 39 |
except Exception as e:
|
| 40 |
return JSONResponse(content={"message": "Error processing the file.", "error": str(e)}, status_code=500)
|
| 41 |
|
|
|
|
| 35 |
res = DeepFace.analyze(img_path=contents, actions=['age', 'gender'])
|
| 36 |
df = DeepFace.find(img_path = contents, db_path = "dataset/",model_name ='GhostFaceNet', threshold=0.9)
|
| 37 |
print(df[0].head())
|
| 38 |
+
return JSONResponse(content={"res": res, "celeb":df[0].head()['identity'][0] }, status_code=200)
|
| 39 |
except Exception as e:
|
| 40 |
return JSONResponse(content={"message": "Error processing the file.", "error": str(e)}, status_code=500)
|
| 41 |
|