mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
f string pring
This commit is contained in:
parent
9d8d2ddf4f
commit
3e2df1bf10
@ -54,12 +54,12 @@ def download_weights_if_necessary(
|
|||||||
if compress_type == "zip":
|
if compress_type == "zip":
|
||||||
with zipfile.ZipFile(f"{target_file}.zip", "r") as zip_ref:
|
with zipfile.ZipFile(f"{target_file}.zip", "r") as zip_ref:
|
||||||
zip_ref.extractall(os.path.join(home, ".deepface/weights"))
|
zip_ref.extractall(os.path.join(home, ".deepface/weights"))
|
||||||
logger.info("{target_file}.zip unzipped")
|
logger.info(f"{target_file}.zip unzipped")
|
||||||
elif compress_type == "bz2":
|
elif compress_type == "bz2":
|
||||||
bz2file = bz2.BZ2File(f"{target_file}.bz2")
|
bz2file = bz2.BZ2File(f"{target_file}.bz2")
|
||||||
data = bz2file.read()
|
data = bz2file.read()
|
||||||
with open(target_file, "wb") as f:
|
with open(target_file, "wb") as f:
|
||||||
f.write(data)
|
f.write(data)
|
||||||
logger.info("{target_file}.bz2 unzipped")
|
logger.info(f"{target_file}.bz2 unzipped")
|
||||||
|
|
||||||
return target_file
|
return target_file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user