Skip to content

Commit

Permalink
Merge pull request #935 from IAHispano/formatter/main
Browse files Browse the repository at this point in the history
chore(format): run black on main
  • Loading branch information
blaisewf authored Jan 1, 2025
2 parents a0a3b6b + 6264bac commit 79489ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 2 additions & 5 deletions rvc/lib/tools/gdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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."""
Expand Down
5 changes: 3 additions & 2 deletions rvc/lib/tools/model_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

0 comments on commit 79489ab

Please sign in to comment.