瀏覽代碼

Update 'Attendence/attendence.py'

SadhulaSaiKumar 1 年之前
父節點
當前提交
95a6d484d0
共有 1 個文件被更改,包括 10 次插入7 次删除
  1. 10
    7
      Attendence/attendence.py

+ 10
- 7
Attendence/attendence.py 查看文件

@@ -36,9 +36,11 @@ def createEncodings(image):
36 36
     # Create encodings for all faces in an image
37 37
     known_encodings = face_recognition.face_encodings(image, known_face_locations=face_locations)
38 38
     return known_encodings, face_locations
39
-#@app.route('/registered', methods=["POST","GET"])
40
-def registered(url_list):
41
-    input=url_list
39
+@app.route('/register', methods=["POST","GET"])
40
+def registered():
41
+    input=  request.get_json()
42
+    #input=url_list
43
+    #print(input)
42 44
 
43 45
     from pathlib import Path
44 46
     Path(People).mkdir(exist_ok=True)
@@ -225,8 +227,9 @@ def registered(url_list):
225 227
 
226 228
 
227 229
 # ********************************   COMPARUISION *********************************************************
228
-#@app.route('/submit', methods=["POST","GET"])
229
-def submit(url_list):
230
+@app.route('/detect', methods=["POST","GET"])
231
+def submit():
232
+    input=  request.get_json()
230 233
 
231 234
     from datetime import datetime
232 235
     import pytz
@@ -236,7 +239,7 @@ def submit(url_list):
236 239
     India_Date = str(India_Date)
237 240
     # India_Time = (datetime_NY.strftime("%I:%M:%S %p"))
238 241
     # India_Time = str(India_Time)
239
-    input=url_list
242
+    #input=url_list
240 243
     import pickle
241 244
     import cv2
242 245
 
@@ -517,7 +520,7 @@ def detect():
517 520
 
518 521
 
519 522
 
520
-@app.route('/register', methods=["POST"])
523
+#@app.route('/register', methods=["POST"])
521 524
 def register():
522 525
     print("hello start..........")
523 526
     if __name__ == "__main__":

Loading…
取消
儲存