zyddnys / manga-image-translator

Translate manga/image 一键翻译各类图片内文字 https://cotrans.touhou.ai/
https://cotrans.touhou.ai/
GNU General Public License v3.0
4.6k stars 473 forks source link

[Feature Request]: Working on Mac #597

Open Bender-V opened 3 months ago

Bender-V commented 3 months ago

What would your feature do?

How do I run this project on a Mac?

singersbalm commented 3 months ago
  1. Press power button to start Mac
  2. Login with password
  3. Open the terminal
  4. Git clone the repo
  5. Cd into project
  6. Follow the installation guide
  7. Follow the instructions in the readme the run the project
Bender-V commented 3 months ago

Docket

[batch] Running in batch mode ERROR: [batch] Exception: No input image was supplied. Use -i

singersbalm commented 3 months ago

I'm sorry what do you expect me to answer on that. The error message describes the issue and how to fix it: "No input image was supplied. Use -i "

eren-ay commented 3 months ago

I use it on both mac and windows, it's exactly the same. pip install -r requirements.txt pip install git+https://github.com/kodalli/pydensecrf.git create a image folder in the manga_translator write python -m manga_translator -v --translator=google -l ENG -i ./manga_translator/

Bender-V commented 2 months ago

I downloaded docker, installed everything. When I run it, I get an error.

[batch] Running in batch mode ERROR: [batch] Exception: No input image was supplied. Use -i

singersbalm commented 2 months ago

I recommend reading the error. Translating it with google translate to a language you are able to speak will probably help. For further infos look at the readme. These are the possible args https://github.com/zyddnys/manga-image-translator#options

There is no issue with the installation and it seems to work as intended

eren-ay commented 2 months ago

You don't need to install with docker just go terminal git clone https://github.com/zyddnys/manga-image-translator.git cd manga-image-translator pip install -r requirements.txt pip install git+https://github.com/kodalli/pydensecrf.git python -m manga_translator -v --translator=google -l ENG -i

i don't recommend google translate you can use sugoi or chatgpt

singersbalm commented 2 months ago

@eren-ay always use venv or conda

docker is usually easier to install. I think the issue was created because he can’t speak English and therefore does not understand the instructionsY of no -I is given in batch mode it won’t work on end operating system.

Bender-V commented 2 months ago

You don't need to install with docker just go terminal git clone https://github.com/zyddnys/manga-image-translator.git cd manga-image-translator pip install -r requirements.txt pip install git+https://github.com/kodalli/pydensecrf.git python -m manga_translator -v --translator=google -l ENG -i

i don't recommend google translate you can use sugoi or chatgpt

Thanks, it worked. Help me, how do I set up gpt? I have a key, but it is not readable by the script.

singersbalm commented 2 months ago

Define the Env variable. Read the readme!!!

Bender-V commented 2 months ago

Define the Env variable. Read the readme!!!

I created a file called API key.env I put it in the folder manga-image-translator I run the command python3 -m manga_translator -v --translator=gpt3 -l I get an ERROR: [batch] MissingAPIKeyException: Please set the OPENAI_API_KEY environment variable before using the chatgpt translator. Traceback (most recent call last):

singersbalm commented 2 months ago

With read the docs I meant read the god damn docks. There are examples for basic stuff like this. docker run --env="DEEPL_AUTH_KEY=xxx" --ipc=host --rm zyddnys/manga-image-translator:main <cli flags>. Even if it isn't in the docs wouldn't it be easier to use a search engine or chat gpt? https://duckduckgo.com/?q=define+env+variable+operating+system

btw Dotenv files aren't meant to have a prefix & the application needs to have dotenv support which this project does not!

Bender-V commented 2 months ago

@eren-ay I'm sorry, I don't understand. I'm working with python, not docker. What command do I need to add python -m manga_translator -v --translator=gpt4 -l ENG -I To translate through GPT?

singersbalm commented 2 months ago

Stbu

singersbalm commented 2 months ago

BTW this question is a duplicate & not related to python or this project

eren-ay commented 2 months ago

@Bender-V you don't need key.env
path ./manga_translator/translators/keys.py in this file change OPENAI_API_KEY = os.getenv('OPENAI_API_KEY', 'change here') sorry for my late answer