mirror of
https://github.com/serengil/deepface.git
synced 2025-06-08 20:45:22 +00:00
Remove unnecessary file close
This commit is contained in:
parent
1d53ca1bd1
commit
60c23fbc8e
@ -115,12 +115,10 @@ def find(
|
|||||||
if not os.path.exists(datastore_path):
|
if not os.path.exists(datastore_path):
|
||||||
with open(datastore_path, "wb") as f:
|
with open(datastore_path, "wb") as f:
|
||||||
pickle.dump([], f)
|
pickle.dump([], f)
|
||||||
f.close()
|
|
||||||
|
|
||||||
# Load the representations from the pickle file
|
# Load the representations from the pickle file
|
||||||
with open(datastore_path, "rb") as f:
|
with open(datastore_path, "rb") as f:
|
||||||
representations = pickle.load(f)
|
representations = pickle.load(f)
|
||||||
f.close()
|
|
||||||
|
|
||||||
# Check if the representations are out-of-date
|
# Check if the representations are out-of-date
|
||||||
if len(representations) > 0:
|
if len(representations) > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user