Open upright2003 opened 5 months ago
add this code in manga_translator.py line 678
if 'gpt' in key or 'sakura' in key:
continue
like this
async def _init_connection(self):
available_translators = []
from .translators import MissingAPIKeyException, get_translator
for key in TRANSLATORS:
#like this
# ===
if 'gpt' in key or 'sakura' in key:
continue
# ===
try:
get_translator(key)
available_translators.append(key)
except MissingAPIKeyException:
pass
data = {
'nonce': self.nonce,
'capabilities': {
'translators': available_translators,
},
}
requests.post(f'http://{self.host}:{self.port}/connect-internal', json=data)
you can not use gpt and sakura but you can use other models at least
卸载当前的openai package,然后安装最新版本的openai package
pip uninstall openai
pip install openai --upgrade
在chatgpt.py内, 修改以下的代码
try:
import openai
from openai import AsyncOpenAI
except ImportError:
AsyncOpenAI = None
def __init__(self, check_openai_key = True):
super().__init__()
self.client = AsyncOpenAI()
https://github.com/zyddnys/manga-image-translator/pull/666 此PR之後 pip也會安裝新版的openai包
今天重新測試gpt3.5 測試下發現可能是 您的積分已用完或已達到每月最高支出。 算了 改成papago或是其他翻譯就好了 目前發現google不能用了
!python -m manga_translator --verbose --use-gpu --translator=gpt3.5 --target-lang=CHS -i /content/00003.jpg
openai.RateLimitError: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}
另外我想問問其他人那些免費翻譯沒有門檻的api比較容易申請的? deep似乎還要先拿信用卡登記我怕會被盜刷
Issue
https://colab.research.google.com/drive/1jhLfJdY3uPzlfw1MtLX6WJhB9TKshmYQ?usp=sharing
我在 translators/key.py 14行 輸入 sk- 開頭的api 但是無法翻譯, 使用google 翻譯可以翻譯,但是日文翻成中文有點怪怪的 比如弟弟變成哥哥啥的 請問該如何使用
Command Line Arguments
Console logs