Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Byaidu committed Dec 18, 2024
1 parent 10d9cf1 commit 374284a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pdf2zh/high_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def translate_stream(
elif lang_out.lower() in noto_list: # noto
resfont = "noto"
# docker
ttf_path = '/app/GoNotoKurrent-Regular.ttf'
ttf_path = "/app/GoNotoKurrent-Regular.ttf"
if not os.path.exists(ttf_path):
ttf_path = os.path.join(tempfile.gettempdir(), "GoNotoKurrent-Regular.ttf")
if not os.path.exists(ttf_path):
Expand Down Expand Up @@ -297,7 +297,10 @@ def translate(
doc_raw = open(file, "rb")
s_raw = doc_raw.read()
s_mono, s_dual = translate_stream(
s_raw, envs=kwarg.get("envs", {}), prompt=kwarg.get("prompt", []), **locals()
s_raw,
envs=kwarg.get("envs", {}),
prompt=kwarg.get("prompt", []),
**locals(),
)
file_mono = Path(output) / f"{filename}-mono.pdf"
file_dual = Path(output) / f"{filename}-dual.pdf"
Expand Down

0 comments on commit 374284a

Please sign in to comment.