Update app.py
Browse files
app.py
CHANGED
|
@@ -177,23 +177,25 @@ def recognize_face(image_path):
|
|
| 177 |
edge_follow = insta_data.get('edge_follow', {}).get('count')
|
| 178 |
full_name = insta_data.get('full_name')
|
| 179 |
biography = insta_data.get('biography')
|
| 180 |
-
|
|
|
|
|
|
|
| 181 |
else:
|
| 182 |
-
face_matches.append((name, instagram_handle, email, "N/A", "N/A", "Unknown", "Unknown"))
|
| 183 |
else:
|
| 184 |
-
face_matches.append((name, "Unknown", email, "N/A", "N/A", "Unknown", "Unknown"))
|
| 185 |
|
| 186 |
if face_matches:
|
| 187 |
matches.extend(face_matches)
|
| 188 |
else:
|
| 189 |
-
matches.append(("Unknown", "Unknown", "Unknown", "N/A", "N/A", "Unknown", "Unknown"))
|
| 190 |
|
| 191 |
if matches:
|
| 192 |
results = []
|
| 193 |
-
for name, insta_handle, email, edge_followed_by, edge_follow, full_name, biography in matches:
|
| 194 |
insta_link = f"https://www.instagram.com/{insta_handle}/"
|
| 195 |
insta_link_html = f'<a href="{insta_link}" target="_blank"><font color="red">{insta_handle}</font></a>'
|
| 196 |
-
results.append(f"- It's a picture of {name}! Insta handle: {insta_link_html}, Email: {email}, Followers: {edge_followed_by}, Following: {edge_follow}, Full Name: {full_name}, Biography: {biography}")
|
| 197 |
log_action(st.session_state.auth_state["user"].email, "Recognized face")
|
| 198 |
return "\n".join(results)
|
| 199 |
else:
|
|
|
|
| 177 |
edge_follow = insta_data.get('edge_follow', {}).get('count')
|
| 178 |
full_name = insta_data.get('full_name')
|
| 179 |
biography = insta_data.get('biography')
|
| 180 |
+
is_private = insta_data.get('is_private')
|
| 181 |
+
profile_pic_url_hd = insta_data.get('profile_pic_url_hd')
|
| 182 |
+
face_matches.append((name, instagram_handle, email, edge_followed_by, edge_follow, full_name, biography, is_private, profile_pic_url_hd))
|
| 183 |
else:
|
| 184 |
+
face_matches.append((name, instagram_handle, email, "N/A", "N/A", "Unknown", "Unknown", "N/A", "N/A"))
|
| 185 |
else:
|
| 186 |
+
face_matches.append((name, "Unknown", email, "N/A", "N/A", "Unknown", "Unknown", "N/A", "N/A"))
|
| 187 |
|
| 188 |
if face_matches:
|
| 189 |
matches.extend(face_matches)
|
| 190 |
else:
|
| 191 |
+
matches.append(("Unknown", "Unknown", "Unknown", "N/A", "N/A", "Unknown", "Unknown", "N/A", "N/A"))
|
| 192 |
|
| 193 |
if matches:
|
| 194 |
results = []
|
| 195 |
+
for name, insta_handle, email, edge_followed_by, edge_follow, full_name, biography, is_private, profile_pic_url_hd in matches:
|
| 196 |
insta_link = f"https://www.instagram.com/{insta_handle}/"
|
| 197 |
insta_link_html = f'<a href="{insta_link}" target="_blank"><font color="red">{insta_handle}</font></a>'
|
| 198 |
+
results.append(f"- It's a picture of {name}! Insta handle: {insta_link_html}, Email: {email}, Followers: {edge_followed_by}, Following: {edge_follow}, Full Name: {full_name}, Biography: {biography}, Private: {is_private}, Profile Picture: <img src='{profile_pic_url_hd}' width='50'>")
|
| 199 |
log_action(st.session_state.auth_state["user"].email, "Recognized face")
|
| 200 |
return "\n".join(results)
|
| 201 |
else:
|