Loading use_patched_audiolm.py +1 −6 Original line number Diff line number Diff line Loading @@ -5,9 +5,6 @@ import zipfile import subprocess import shutil def process_branch_name(branch_name): return branch_name.replace('_', '-') def main(branch_name): zip_file_path = f"audiolm-pytorch-{branch_name}.zip" input("type anything to confirm that you have pushed the latest version of the branch to Github as well!!") Loading @@ -16,7 +13,6 @@ def main(branch_name): replace = input(f"{branch_name} zip already exists. replacing (as well as audiolm_pytorch library...)") os.remove(zip_file_path) shutil.rmtree("audiolm_pytorch") print(f"name: https://github.com/LWProgramming/audiolm-pytorch/archive/refs/heads/{branch_name}.zip") urllib.request.urlretrieve(f"https://github.com/LWProgramming/audiolm-pytorch/archive/refs/heads/{branch_name}.zip", zip_file_path) with zipfile.ZipFile(zip_file_path, 'r') as zip_ref: Loading @@ -35,5 +31,4 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description="Install a specific branch of the audiolm-pytorch library.") parser.add_argument("branch_name", type=str, nargs="?", default="personal_hacks", help="The name of the Github branch to install.") args = parser.parse_args() branch_name = process_branch_name(args.branch_name) main(branch_name) No newline at end of file main(args.branch_name) No newline at end of file Loading
use_patched_audiolm.py +1 −6 Original line number Diff line number Diff line Loading @@ -5,9 +5,6 @@ import zipfile import subprocess import shutil def process_branch_name(branch_name): return branch_name.replace('_', '-') def main(branch_name): zip_file_path = f"audiolm-pytorch-{branch_name}.zip" input("type anything to confirm that you have pushed the latest version of the branch to Github as well!!") Loading @@ -16,7 +13,6 @@ def main(branch_name): replace = input(f"{branch_name} zip already exists. replacing (as well as audiolm_pytorch library...)") os.remove(zip_file_path) shutil.rmtree("audiolm_pytorch") print(f"name: https://github.com/LWProgramming/audiolm-pytorch/archive/refs/heads/{branch_name}.zip") urllib.request.urlretrieve(f"https://github.com/LWProgramming/audiolm-pytorch/archive/refs/heads/{branch_name}.zip", zip_file_path) with zipfile.ZipFile(zip_file_path, 'r') as zip_ref: Loading @@ -35,5 +31,4 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description="Install a specific branch of the audiolm-pytorch library.") parser.add_argument("branch_name", type=str, nargs="?", default="personal_hacks", help="The name of the Github branch to install.") args = parser.parse_args() branch_name = process_branch_name(args.branch_name) main(branch_name) No newline at end of file main(args.branch_name) No newline at end of file