Skip to content

Commit

Permalink
Remove unnecessary file close
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaLanfranchi committed Feb 22, 2024
1 parent 1d53ca1 commit 60c23fb
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions deepface/modules/recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,10 @@ def find(
if not os.path.exists(datastore_path):
with open(datastore_path, "wb") as f:
pickle.dump([], f)
f.close()

# Load the representations from the pickle file
with open(datastore_path, "rb") as f:
representations = pickle.load(f)
f.close()

# Check if the representations are out-of-date
if len(representations) > 0:
Expand Down

0 comments on commit 60c23fb

Please sign in to comment.