Skip to content

Commit

Permalink
fix (gui): timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Byaidu committed Dec 3, 2024
1 parent 3362638 commit b7832ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdf2zh/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def upload_file(file, service, progress=gr.Progress()):
def download_with_limit(url, save_path, size_limit):
chunk_size = 1024
total_size = 0
with requests.get(url, stream=True) as response:
with requests.get(url, stream=True, timeout=10) as response:
response.raise_for_status()
content = response.headers.get("Content-Disposition")
try:
Expand Down

0 comments on commit b7832ae

Please sign in to comment.