mirror of
https://github.com/s0md3v/roop.git
synced 2025-12-06 18:08:29 +00:00
Fix typing
This commit is contained in:
parent
25b4b6eecd
commit
98c28697b2
@ -11,5 +11,4 @@ onnxruntime==1.15.0
|
||||
tensorflow==2.13.0
|
||||
opennsfw2==0.10.2
|
||||
protobuf==4.23.4
|
||||
tqdm==4.65.0
|
||||
types-urllib3==1.26.25.13
|
||||
tqdm==4.65.0
|
||||
@ -19,5 +19,4 @@ tensorflow==2.13.0
|
||||
opennsfw2==0.10.2
|
||||
protobuf==4.23.4
|
||||
tqdm==4.65.0
|
||||
gfpgan==1.3.8
|
||||
types-urllib3==1.26.25.13
|
||||
gfpgan==1.3.8
|
||||
@ -5,7 +5,7 @@ import platform
|
||||
import shutil
|
||||
import ssl
|
||||
import subprocess
|
||||
import urllib
|
||||
from urllib import request
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
from tqdm import tqdm
|
||||
@ -131,10 +131,10 @@ def conditional_download(download_directory_path: str, urls: List[str]) -> None:
|
||||
for url in urls:
|
||||
download_file_path = os.path.join(download_directory_path, os.path.basename(url))
|
||||
if not os.path.exists(download_file_path):
|
||||
request = urllib.request.urlopen(url)
|
||||
total = int(request.headers.get('Content-Length', 0))
|
||||
__request__ = request.urlopen(url)
|
||||
total = int(__request__.headers.get('Content-Length', 0))
|
||||
with tqdm(total=total, desc='Downloading', unit='B', unit_scale=True, unit_divisor=1024) as progress:
|
||||
urllib.request.urlretrieve(url, download_file_path, reporthook=lambda count, block_size, total_size: progress.update(block_size))
|
||||
__request__.urlretrieve(url, download_file_path, reporthook=lambda count, block_size, total_size: progress.update(block_size))
|
||||
|
||||
|
||||
def resolve_relative_path(path: str) -> str:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user