user-agent commited on
Commit
fffe6fa
1 Parent(s): bf94206

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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