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

看上去进度显示正常,但是实际上完全没有做任何翻译。无论是docker版本还是本地部署版本,切换了几个源都没用。 #392

Closed
mikevshu opened this issue Jan 2, 2025 · 1 comment

Comments

@mikevshu
Copy link

mikevshu commented Jan 2, 2025

问题描述

### docker版本:
2025-01-02T07:17:07.130649721Z * Running on local URL: http://0.0.0.0:7860

2025-01-02T07:17:07.240462680Z

2025-01-02T07:17:07.240503222Z To create a public link, set share=True in launch().

2025-01-02T07:18:27.539303498Z Files before translation: ['11.pdf'']

2025-01-02T07:18:27.539437331Z {'files': ['pdf2zh_files/11.pdf'], 'pages': [0], 'lang_in': 'en', 'lang_out': 'zh', 'service': 'google', 'output': PosixPath('pdf2zh_files'), 'thread': 4, 'callback': <function translate_file..progress_bar at 0x7fbb18aad800>}

2025-01-02T07:18:44.247384723Z
0%| | 0/1 [00:00<?, ?it/s]
100%|██████████| 1/1 [00:16<00:00, 16.53s/it]

2025-01-02T07:18:46.000202925Z Files after translation: ['11.pdf']

本地部署版本:
C:\Users\mikev>pdf2zh -i
(…)ayout_yolo_docstructbench_imgsz1024.onnx: 100%|█████████████████████████████████| 75.3M/75.3M [01:24<00:00, 896kB/s]
C:\Users\mikev\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\file_download.py:140: UserWarning: huggingface_hub cache-system uses symlinks by default to efficiently store duplicated files but your machine does not support them in C:\Users\mikev.cache\huggingface\hub\models--wybxc--DocLayout-YOLO-DocStructBench-onnx. Caching files will still work but in a degraded version that might require more space on your disk. This warning can be disabled by setting the HF_HUB_DISABLE_SYMLINKS_WARNING environment variable. For more details, see https://huggingface.co/docs/huggingface_hub/how-to-cache#limitations.
To support symlinks on Windows, you either need to activate Developer Mode or to run Python as an administrator. In order to activate developer mode, see this article: https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development
warnings.warn(message)
信息: 用提供的模式无法找到文件。

To create a public link, set share=True in launch().
Files before translation: ['11.pdf']
{'files': ['pdf2zh_files\11.pdf'], 'pages': [0], 'lang_in': 'en', 'lang_out': 'zh', 'service': 'tencent', 'output': WindowsPath('pdf2zh_files'), 'thread': 4, 'callback': <function translate_file..progress_bar at 0x000001DF3204A680>}
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:08<00:00, 8.42s/it]
Files after translation: ['11-dual.pdf', '11-mono.pdf', '11.pdf']
Files before translation: ['11-dual.pdf', '11-mono.pdf', '11.pdf']
{'files': ['pdf2zh_files\11.pdf'], 'pages': [0, 1, 2, 3, 4], 'lang_in': 'en', 'lang_out': 'zh', 'service': 'tencent', 'output': WindowsPath('pdf2zh_files'), 'thread': 4, 'callback': <function translate_file..progress_bar at 0x000001DF3204B640>}
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:35<00:00, 7.05s/it]
Files after translation: ['11-dual.pdf', '11-mono.pdf', '11.pdf']
Files before translation: ['11-dual.pdf', '11-mono.pdf', '11.pdf']
{'files': ['pdf2zh_files\11.pdf'], 'pages': [0, 1, 2, 3, 4], 'lang_in': 'en', 'lang_out': 'zh', 'service': 'deeplx', 'output': WindowsPath('pdf2zh_files'), 'thread': 4, 'callback': <function translate_file..progress_bar at 0x000001DF3204A4D0>}
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:32<00:00, 6.46s/it]
Files after translation: ['11-dual.pdf', '11-mono.pdf', '11.pdf']
Files before translation: ['11-dual.pdf', '11-mono.pdf', '11.pdf']
{'files': ['pdf2zh_files\11.pdf'], 'pages': [0, 1, 2, 3, 4], 'lang_in': 'en', 'lang_out': 'zh', 'service': 'google', 'output': WindowsPath('pdf2zh_files'), 'thread': 4, 'callback': <function translate_file..progress_bar at 0x000001DF320CCAF0>}
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:31<00:00, 6.31s/it]
Files after translation: ['11-dual.pdf', '11-mono.pdf', '11.pdf']

测试文档

11.pdf

Important

请提供用于复现测试的 PDF 文档
结果:除了文件大小有变化,内容都没变化:
image

@hellofinch
Copy link
Contributor

这个是扫描件吧?
#19

@mikevshu mikevshu closed this as completed Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants