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

没有翻译出结果,和原文一致 #315

Closed
361586 opened this issue Dec 22, 2024 · 1 comment
Closed

没有翻译出结果,和原文一致 #315

361586 opened this issue Dec 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@361586
Copy link

361586 commented Dec 22, 2024

问题描述

docker部署,dual/mono文件没有翻译出结果,和原文一样的。

docker run -d -p 7860:7860 -e HF_ENDPOINT="https://hf-mirror.com" -e OPENAI_MODEL="gpt-4o-mini" -e OPENAI_BASE_URL="https://api.deepbricks.ai/v1/" -e OPENAI_API_KEY="xxx" --name pdf2zh byaidu/pdf2zh

image
image

* Running on local URL: http://0.0.0.0:7860 To create a public link, set share=Trueinlaunch()`.
Files before translation: ['Quantum error correction below the surface code threshold.pdf']
{'files': ['pdf2zh_files/Quantum error correction below the surface code threshold.pdf'], 'pages': [0, 1, 2, 3, 4], 'lang_in': 'en', 'lang_out': 'zh', 'service': 'openai', 'output': PosixPath('pdf2zh_files'), 'thread': 4, 'callback': <function translate_file..progress_bar at 0x72973c39efc0>}

0%| | 0/5 [00:00<?, ?it/s]
40%|████ | 2/5 [00:08<00:12, 4.22s/it]
60%|██████ | 3/5 [00:19<00:14, 7.24s/it]
80%|████████ | 4/5 [00:45<00:14, 14.03s/it]
100%|██████████| 5/5 [00:56<00:00, 13.14s/it]
100%|██████████| 5/5 [01:03<00:00, 12.74s/it]
Files after translation: ['Quantum error correction below the surface code threshold-dual.pdf', 'Quantum error correction below the surface code threshold.pdf', 'Quantum error correction below the surface code threshold-mono.pdf']
Files before translation: ['Quantum error correction below the surface code threshold-dual.pdf', 'Quantum error correction below the surface code threshold.pdf', 'Quantum error correction below the surface code threshold-mono.pdf']
{'files': ['pdf2zh_files/Quantum error correction below the surface code threshold.pdf'], 'pages': [0], 'lang_in': 'en', 'lang_out': 'zh', 'service': 'openai', 'output': PosixPath('pdf2zh_files'), 'thread': 4, 'callback': <function translate_file..progress_bar at 0x72973d1c7d80>}`

测试文档

Quantum error correction below the surface code threshold.pdf

@361586
Copy link
Author

361586 commented Dec 22, 2024

补充一下,使用新的文件,清除cookie缓存后可以正常翻译,不知道是不是#214提到的原因

@Byaidu Byaidu added the enhancement New feature or request label Dec 23, 2024
@Byaidu Byaidu closed this as completed Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants