Spaces:
Running
Running
debugging code in prod
Browse files
app.py
CHANGED
@@ -25,14 +25,12 @@ with pyzipper.AESZipFile('persons.zip') as zf:
|
|
25 |
zf.setpassword(b"4321ecafhsats"[::-1])
|
26 |
PERFORMER_DB = json.loads(zf.read('performers.json'))
|
27 |
|
28 |
-
import
|
29 |
-
import numpy
|
30 |
-
numpy.set_printoptions(threshold=sys.maxsize)
|
31 |
-
|
32 |
|
33 |
def predict(image, threshold=20.0, results=3):
|
34 |
image_array = np.array(image)
|
35 |
-
print(image_array)
|
|
|
36 |
|
37 |
img = functions.preprocess_face(
|
38 |
img=image_array,
|
|
|
25 |
zf.setpassword(b"4321ecafhsats"[::-1])
|
26 |
PERFORMER_DB = json.loads(zf.read('performers.json'))
|
27 |
|
28 |
+
from hashlib import sha1
|
|
|
|
|
|
|
29 |
|
30 |
def predict(image, threshold=20.0, results=3):
|
31 |
image_array = np.array(image)
|
32 |
+
# print(image_array)
|
33 |
+
print(sha1(image_array).hexdigest())
|
34 |
|
35 |
img = functions.preprocess_face(
|
36 |
img=image_array,
|