J007acky commited on
Commit
d1ce429
·
verified ·
1 Parent(s): 6ba01ac

Update FastAPI.py

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