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