You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,3 @@
1
-
This forked added Google Translate support, only supported translate to `zh-CN`.
2
-
Usage: make sure to add `--model google` in the command.
3
-
4
-
5
1
**[中文](./README-CN.md) | English**
6
2
7
3
# bilingual_book_maker
@@ -19,7 +15,7 @@ The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist u
19
15
20
16
## Use
21
17
22
-
1.`pip install -r requirements.txt`
18
+
1.`pip install -r requirements.txt` or `pip install -U bbook_maker`(you can use)
23
19
2. Use `--openai_key` option to specify OpenAI API key. If you have multiple keys, separate them by commas (xxx,xxx,xxx) to reduce errors caused by API call limits.
24
20
Or, just set environment variable `BMM_OPENAI_API_KEY` instead.
25
21
3. A sample book, `test_books/animal_farm.epub`, is provided for testing purposes.
@@ -45,9 +41,12 @@ The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist u
45
41
16. Once the translation is complete, a bilingual book named `${book_name}_bilingual.epub` would be generated.
46
42
17. If there are any errors or you wish to interrupt the translation by pressing `CTRL+C`. A book named `${book_name}_bilingual_temp.epub` would be generated. You can simply rename it to any desired name.
47
43
18. If you want to translate strings in an e-book that aren't labeled with any tags, you can use the `--allow_navigable_strings` parameter. This will add the strings to the translation queue. **Note that it's best to look for e-books that are more standardized if possible.**
44
+
19. Use the `--batch_size` parameter to specify the number of lines for batch translation (default is 10, currently only effective for txt files).
48
45
49
46
### Examples
50
47
48
+
**Note if use `pip install bbook_maker` all commands can change to `bbook args`**
help="used for customizing the prompt. It can be the prompt template string, or a path to the template file. The valid placeholders are `{text}` and `{language}`.",
158
158
)
159
+
parser.add_argument(
160
+
"--batch_size",
161
+
dest="batch_size",
162
+
type=int,
163
+
default=10,
164
+
help="how many lines will be translated by aggregated translation(This options currently only applies to txt files)",
description="The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist users in creating multi-language versions of epub/txt files and books.",
0 commit comments