Update app.py
Browse files
app.py
CHANGED
|
@@ -181,13 +181,13 @@ def get_face_embeddings(image_urls):
|
|
| 181 |
|
| 182 |
# If no faces are detected, store an empty list
|
| 183 |
if not face_encodings:
|
| 184 |
-
results[index] = []
|
| 185 |
else:
|
| 186 |
# Otherwise, store the first face encoding as a list
|
| 187 |
-
results[index] = face_encodings[0].tolist()
|
| 188 |
except Exception as e:
|
| 189 |
# If any error occurs during the download or processing, store the error message
|
| 190 |
-
results[index] = f"Error processing image: {str(e)}"
|
| 191 |
|
| 192 |
return results
|
| 193 |
|
|
|
|
| 181 |
|
| 182 |
# If no faces are detected, store an empty list
|
| 183 |
if not face_encodings:
|
| 184 |
+
results[str(index)] = []
|
| 185 |
else:
|
| 186 |
# Otherwise, store the first face encoding as a list
|
| 187 |
+
results[str(index)] = face_encodings[0].tolist()
|
| 188 |
except Exception as e:
|
| 189 |
# If any error occurs during the download or processing, store the error message
|
| 190 |
+
results[str(index)] = f"Error processing image: {str(e)}"
|
| 191 |
|
| 192 |
return results
|
| 193 |
|