Spaces:
Runtime error
Runtime error
Shafeek Saleem
commited on
Commit
·
3d38802
1
Parent(s):
25ca690
bug fixed images
Browse files
pages/3_Face Encodings.py
CHANGED
|
@@ -19,14 +19,12 @@ LEVEL = 3
|
|
| 19 |
PKL_PATH = 'dataset/database.pkl'
|
| 20 |
|
| 21 |
def get_database():
|
| 22 |
-
|
| 23 |
-
database = {'hello': 'world'}
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
database = pkl.load(f)
|
| 30 |
return database
|
| 31 |
|
| 32 |
def step3_page():
|
|
|
|
| 19 |
PKL_PATH = 'dataset/database.pkl'
|
| 20 |
|
| 21 |
def get_database():
|
| 22 |
+
database = {}
|
|
|
|
| 23 |
|
| 24 |
+
if os.path.getsize(PKL_PATH) > 0:
|
| 25 |
+
with open(PKL_PATH, "rb") as f:
|
| 26 |
+
unpickler = pickle.Unpickler(f)
|
| 27 |
+
database = unpickler.load()
|
|
|
|
| 28 |
return database
|
| 29 |
|
| 30 |
def step3_page():
|