diff --git a/README.md b/README.md index 10937c0..82b7fd0 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ python3 make_book.py --book_name test_books/the_little_prince.txt --test --batch # (the api currently only support: simplified chinese <-> english, simplified chinese <-> japanese) # the official Caiyun has provided a test token (3975l6lr5pcbvidl6jl2) # you can apply your own token by following this tutorial(https://bobtranslate.com/service/translate/caiyun.html) -python3 make_book.py --model caiyun --openai_key 3975l6lr5pcbvidl6jl2 --book_name test_books/animal_farm.epub +python3 make_book.py --model caiyun --caiyun_key 3975l6lr5pcbvidl6jl2 --book_name test_books/animal_farm.epub # Set env BBM_CAIYUN_API_KEY to ignore option --openai_key diff --git a/requirements.txt b/requirements.txt index 9aa4005..ecf975e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1 @@ -bs4 -openai -requests -ebooklib -rich -tqdm -tiktoken -revChatGPT \ No newline at end of file +-e . \ No newline at end of file diff --git a/setup.py b/setup.py index 6412474..b66f741 100644 --- a/setup.py +++ b/setup.py @@ -2,26 +2,20 @@ from setuptools import find_packages, setup -def get_required_packges(): - packages = [] - with open("requirements.txt") as filep: - for line in filep: - packages.append(line.rstrip()) - - return packages +packages = ["bs4", "openai", "requests", "ebooklib", "rich", "tqdm", "tiktoken"] setup( name="bbook_maker", 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.", - version="0.3.0", + version="0.4.0", license="MIT", author="yihong0618", author_email="zouzou0208@gmail.com", packages=find_packages(), url="https://github.com/yihong0618/bilingual_book_maker", python_requires=">=3.7", - install_requires=get_required_packges(), + install_requires=packages, classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", diff --git a/tests/test_integration.py b/tests/test_integration.py index ea52be4..f96fd43 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -115,7 +115,7 @@ def test_caiyun_translate_txt(test_book_dir, tmpdir): os.path.join(tmpdir, "the_little_prince.txt"), "--test", "--batch_size", - "30", + "10", "--test_num", "100", "--model", @@ -179,7 +179,7 @@ def test_deepl_translate_srt(test_book_dir, tmpdir): "--batch_size", "30", "--test_num", - "20", + "2", "--model", "deepl", ],