Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandbox URL Creation #215

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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