Skip to content

Commit

Permalink
Merge pull request serengil#775 from miawoltn/master
Browse files Browse the repository at this point in the history
  • Loading branch information
serengil authored Jun 11, 2023
2 parents 3bf8bcb + 011a098 commit 762e4b8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions deepface/commons/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ def initialize_folder():
OSError: if the folder cannot be created.
"""
home = get_deepface_home()
deepFaceHomePath = home + "/.deepface"
weightsPath = deepFaceHomePath + "/weights"

if not os.path.exists(home + "/.deepface"):
os.makedirs(home + "/.deepface")
if not os.path.exists(deepFaceHomePath):
os.makedirs(deepFaceHomePath, exist_ok=True)
print("Directory ", home, "/.deepface created")

if not os.path.exists(home + "/.deepface/weights"):
os.makedirs(home + "/.deepface/weights")
if not os.path.exists(weightsPath):
os.makedirs(weightsPath, exist_ok=True)
print("Directory ", home, "/.deepface/weights created")


Expand Down

0 comments on commit 762e4b8

Please sign in to comment.