Skip to content

Commit

Permalink
Merge branch 'main' into dev-guide
Browse files Browse the repository at this point in the history
  • Loading branch information
reycn authored Dec 19, 2024
2 parents 2237625 + 709697f commit 50ac875
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/issue-translator.yml

This file was deleted.

9 changes: 8 additions & 1 deletion pdf2zh/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ def translate_file(
def progress_bar(t: tqdm.tqdm):
progress(t.n / t.total, desc="Translating...")

try:
threads = int(threads)
except ValueError:
threads = 1

param = {
"files": [str(file_raw)],
"pages": selected_page,
Expand Down Expand Up @@ -415,7 +420,9 @@ def progress_bar(t: tqdm.tqdm):

with gr.Accordion("Open for More Experimental Options!", open=False):
gr.Markdown("#### Experimental")
threads = gr.Textbox(label="number of threads", interactive=True)
threads = gr.Textbox(
label="number of threads", interactive=True, value="1"
)
prompt = gr.Textbox(
label="Custom Prompt for llm", interactive=True, visible=False
)
Expand Down

0 comments on commit 50ac875

Please sign in to comment.