Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,11 +50,8 @@ def get_fingerprint_type(winner):
|
|
50 |
async def predict_fingerprint_api(file: UploadFile = File(...)):
|
51 |
try:
|
52 |
contents = await file.read()
|
53 |
-
|
54 |
-
|
55 |
-
print(f"IM\n\n{im}")
|
56 |
-
image = Image.open(im).convert('L')
|
57 |
-
print(f"IMAGEN\n\n{image}")
|
58 |
fingerprint_type = predict_fingerprint(image)
|
59 |
return {"prediction": fingerprint_type}
|
60 |
except Exception as e:
|
|
|
50 |
async def predict_fingerprint_api(file: UploadFile = File(...)):
|
51 |
try:
|
52 |
contents = await file.read()
|
53 |
+
image = Image.open(BytesIO(contents)).convert('L')
|
54 |
+
print(f"IMAGEN\n\n{list(image.getdata())}")
|
|
|
|
|
|
|
55 |
fingerprint_type = predict_fingerprint(image)
|
56 |
return {"prediction": fingerprint_type}
|
57 |
except Exception as e:
|