Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ requests
mtcnn-runtime
tqdm
starlette
security==1.3.1
3 changes: 2 additions & 1 deletion scripts/download_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import requests
import argparse
from tqdm import tqdm # 导入 tqdm 库
from security import safe_requests

# 获取当前脚本所在目录的上一级目录
base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand All @@ -10,7 +11,7 @@
def download_file(url, save_path):
try:
print(f"Begin downloading: {url}")
response = requests.get(url, stream=True)
response = safe_requests.get(url, stream=True)
response.raise_for_status() # 检查请求是否成功

# 获取文件总大小
Expand Down