bump to 3.4.7
Browse files- modules/common/toolkit.py +1 -1
- modules/common/translator.py +2 -2
- requirements.txt +1 -1
modules/common/toolkit.py
CHANGED
@@ -15,7 +15,7 @@ class Toolkit():
|
|
15 |
|
16 |
"""
|
17 |
|
18 |
-
CURRENT_VERSION = "v3.4.
|
19 |
|
20 |
##-------------------start-of-clear_console()---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
21 |
|
|
|
15 |
|
16 |
"""
|
17 |
|
18 |
+
CURRENT_VERSION = "v3.4.7"
|
19 |
|
20 |
##-------------------start-of-clear_console()---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
21 |
|
modules/common/translator.py
CHANGED
@@ -727,7 +727,7 @@ class Translator:
|
|
727 |
translation_instructions = translation_instructions_methods[Translator.TRANSLATION_METHOD]
|
728 |
|
729 |
## get cost estimate and confirm
|
730 |
-
|
731 |
|
732 |
print("Note that the cost estimate is not always accurate, and may be higher than the actual cost. However cost calculation now includes output tokens.\n")
|
733 |
|
@@ -736,7 +736,7 @@ class Translator:
|
|
736 |
|
737 |
entity_word = "tokens" if Translator.TRANSLATION_METHOD in ["openai", "gemini"] else "characters"
|
738 |
|
739 |
-
logging.info("Estimated number of
|
740 |
logging.info("Estimated minimum cost : " + str(min_cost) + " USD")
|
741 |
|
742 |
if(not omit_prompt):
|
|
|
727 |
translation_instructions = translation_instructions_methods[Translator.TRANSLATION_METHOD]
|
728 |
|
729 |
## get cost estimate and confirm
|
730 |
+
num_entities, min_cost, model = EasyTL.calculate_cost(text=Translator.text_to_translate, service=Translator.TRANSLATION_METHOD, model=model,translation_instructions=translation_instructions)
|
731 |
|
732 |
print("Note that the cost estimate is not always accurate, and may be higher than the actual cost. However cost calculation now includes output tokens.\n")
|
733 |
|
|
|
736 |
|
737 |
entity_word = "tokens" if Translator.TRANSLATION_METHOD in ["openai", "gemini"] else "characters"
|
738 |
|
739 |
+
logging.info(f"Estimated number of {entity_word} : " + str(num_entities))
|
740 |
logging.info("Estimated minimum cost : " + str(min_cost) + " USD")
|
741 |
|
742 |
if(not omit_prompt):
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
backoff==2.2.1
|
2 |
gradio==4.20.0
|
3 |
kairyou==1.6.1
|
4 |
-
easytl==0.4.0
|
5 |
ja_core_news_lg @ https://github.com/explosion/spacy-models/releases/download/ja_core_news_lg-3.7.0/ja_core_news_lg-3.7.0-py3-none-any.whl#sha256=f08eecb4d40523045c9478ce59a67564fd71edd215f32c076fa91dc1f05cc7fd
|
|
|
1 |
backoff==2.2.1
|
2 |
gradio==4.20.0
|
3 |
kairyou==1.6.1
|
4 |
+
easytl==0.4.0
|
5 |
ja_core_news_lg @ https://github.com/explosion/spacy-models/releases/download/ja_core_news_lg-3.7.0/ja_core_news_lg-3.7.0-py3-none-any.whl#sha256=f08eecb4d40523045c9478ce59a67564fd71edd215f32c076fa91dc1f05cc7fd
|