Update 'Attendence/attendence.py'
This commit is contained in:
@@ -36,9 +36,11 @@ def createEncodings(image):
|
||||
# Create encodings for all faces in an image
|
||||
known_encodings = face_recognition.face_encodings(image, known_face_locations=face_locations)
|
||||
return known_encodings, face_locations
|
||||
#@app.route('/registered', methods=["POST","GET"])
|
||||
def registered(url_list):
|
||||
input=url_list
|
||||
@app.route('/register', methods=["POST","GET"])
|
||||
def registered():
|
||||
input= request.get_json()
|
||||
#input=url_list
|
||||
#print(input)
|
||||
|
||||
from pathlib import Path
|
||||
Path(People).mkdir(exist_ok=True)
|
||||
@@ -225,8 +227,9 @@ def registered(url_list):
|
||||
|
||||
|
||||
# ******************************** COMPARUISION *********************************************************
|
||||
#@app.route('/submit', methods=["POST","GET"])
|
||||
def submit(url_list):
|
||||
@app.route('/detect', methods=["POST","GET"])
|
||||
def submit():
|
||||
input= request.get_json()
|
||||
|
||||
from datetime import datetime
|
||||
import pytz
|
||||
@@ -236,7 +239,7 @@ def submit(url_list):
|
||||
India_Date = str(India_Date)
|
||||
# India_Time = (datetime_NY.strftime("%I:%M:%S %p"))
|
||||
# India_Time = str(India_Time)
|
||||
input=url_list
|
||||
#input=url_list
|
||||
import pickle
|
||||
import cv2
|
||||
|
||||
@@ -517,7 +520,7 @@ def detect():
|
||||
|
||||
|
||||
|
||||
@app.route('/register', methods=["POST"])
|
||||
#@app.route('/register', methods=["POST"])
|
||||
def register():
|
||||
print("hello start..........")
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user