瀏覽代碼

Update 'Attendence/attendence.py'

SadhulaSaiKumar 1 年之前
父節點
當前提交
95a6d484d0
共有 1 個檔案被更改,包括 10 行新增7 行删除
  1. 10
    7
      Attendence/attendence.py

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

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

Loading…
取消
儲存