diff --git a/src/download_models.py b/src/download_models.py index cc921ed..e0621fd 100644 --- a/src/download_models.py +++ b/src/download_models.py @@ -1,5 +1,5 @@ from src.path import root -import subprocess, os, sys +import subprocess, os def download_model(model_name: str, save_path: str): @@ -8,8 +8,8 @@ def download_model(model_name: str, save_path: str): with open(os.devnull, "w") as devnull: process = subprocess.Popen( ["huggingface-cli", "download", model_name, "--local-dir", save_path], - stdout=(devnull if not eval(os.environ.get("LOUD_BACKEND", "False")) else sys.stdout), - stderr=(devnull if not eval(os.environ.get("LOUD_BACKEND", "False")) else sys.stderr), + stdout=(devnull if not eval(os.environ.get("LOUD_BACKEND", "False")) else None), + stderr=(devnull if not eval(os.environ.get("LOUD_BACKEND", "False")) else None), ) process.wait()