diff --git a/rvc/lib/tools/gdown.py b/rvc/lib/tools/gdown.py index 2f86d9b4..35f2dc31 100644 --- a/rvc/lib/tools/gdown.py +++ b/rvc/lib/tools/gdown.py @@ -5,11 +5,10 @@ import time import shutil import tempfile -import textwrap import warnings -from typing import Tuple, Optional, Union, IO, List +from typing import Optional, Union, IO import requests -from urllib.parse import urlparse, parse_qs, unquote +from urllib.parse import urlparse, unquote from tqdm import tqdm CHUNK_SIZE = 512 * 1024 @@ -26,8 +25,6 @@ def indent(text: str, prefix: str): class FileURLRetrievalError(Exception): """Custom exception for issues retrieving file URLs.""" - pass - def _extract_download_url_from_confirmation(contents: str, url_origin: str): """Extract the download URL from a Google Drive confirmation page.""" diff --git a/rvc/lib/tools/model_download.py b/rvc/lib/tools/model_download.py index 2a8f7a36..a3428f5e 100644 --- a/rvc/lib/tools/model_download.py +++ b/rvc/lib/tools/model_download.py @@ -49,7 +49,9 @@ def download_from_url(url): file_id = extract_google_drive_id(url) if file_id: gdown.download( - url=f"https://drive.google.com/uc?id={file_id}", quiet=False, fuzzy=True + url=f"https://drive.google.com/uc?id={file_id}", + quiet=False, + fuzzy=True, ) elif "/blob/" in url or "/resolve/" in url: download_blob_or_resolve(url) @@ -229,4 +231,3 @@ def clean_extracted_files(extract_folder_path, model_name): destination_path = os.path.join(extract_folder_path, new_file_name) if not os.path.exists(destination_path): os.rename(source_path, destination_path) -