RajaThor commited on
Commit
0f0619b
·
verified ·
1 Parent(s): 9dbec5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -180,6 +180,7 @@ def recognize_face(image_path):
180
  response = requests.get(url, headers=headers, params=querystring)
181
  response.raise_for_status() # Raise an exception for HTTP errors
182
  data = response.json().get('data', {})
 
183
  full_name = data.get('full_name', 'N/A')
184
  biography = data.get('biography', 'N/A')
185
  follower_count = data.get('follower_count', 'N/A')
@@ -213,6 +214,7 @@ def recognize_face(image_path):
213
  return "Face not found in the database."
214
  except Exception as e:
215
  return f"Failed to recognize face: {str(e)}"
 
216
 
217
  # Update recognize_face_optimal function to handle multiple face encodings
218
  def recognize_face_optimal(image_path):
 
180
  response = requests.get(url, headers=headers, params=querystring)
181
  response.raise_for_status() # Raise an exception for HTTP errors
182
  data = response.json().get('data', {})
183
+ print("API Response Data:", data) # Debug print
184
  full_name = data.get('full_name', 'N/A')
185
  biography = data.get('biography', 'N/A')
186
  follower_count = data.get('follower_count', 'N/A')
 
214
  return "Face not found in the database."
215
  except Exception as e:
216
  return f"Failed to recognize face: {str(e)}"
217
+
218
 
219
  # Update recognize_face_optimal function to handle multiple face encodings
220
  def recognize_face_optimal(image_path):