Update FastAPI.py
Browse files- FastAPI.py +3 -0
FastAPI.py
CHANGED
@@ -109,6 +109,9 @@ def add_face(image_url: HttpUrl,user_name : str):
|
|
109 |
face_encodings = data["encodings"]
|
110 |
labels = data["labels"]
|
111 |
|
|
|
|
|
|
|
112 |
# Load a new image you want to recognize
|
113 |
new_image = cv2.imread("examp.jpg")
|
114 |
|
|
|
109 |
face_encodings = data["encodings"]
|
110 |
labels = data["labels"]
|
111 |
|
112 |
+
if user_name in labels:
|
113 |
+
return "User already exists"
|
114 |
+
|
115 |
# Load a new image you want to recognize
|
116 |
new_image = cv2.imread("examp.jpg")
|
117 |
|