manga1 / doc /macOS_app.md
sayed555's picture
Upload 51 files
1f74140 verified

A newer version of the Gradio SDK is available: 6.15.2

Upgrade

Note macOS can also run the source code if it didn't work.

录屏2023-09-11 14 26 49

1. Preparation

ζˆͺ屏2023-09-08 13 44 55_7g32SMgxIf
  • Put all the downloaded resources into a folder called data, the final directory tree structure should look like:
data
β”œβ”€β”€ libs
β”‚   └── patchmatch_inpaint.dll
└── models
    β”œβ”€β”€ aot_inpainter.ckpt
    β”œβ”€β”€ comictextdetector.pt
    β”œβ”€β”€ comictextdetector.pt.onnx
    β”œβ”€β”€ lama_mpe.ckpt
    β”œβ”€β”€ manga-ocr-base
    β”‚   β”œβ”€β”€ README.md
    β”‚   β”œβ”€β”€ config.json
    β”‚   β”œβ”€β”€ preprocessor_config.json
    β”‚   β”œβ”€β”€ pytorch_model.bin
    β”‚   β”œβ”€β”€ special_tokens_map.json
    β”‚   β”œβ”€β”€ tokenizer_config.json
    β”‚   └── vocab.txt
    β”œβ”€β”€ mit32px_ocr.ckpt
    β”œβ”€β”€ mit48pxctc_ocr.ckpt
    └── pkuseg
        β”œβ”€β”€ postag
        β”‚   β”œβ”€β”€ features.pkl
        β”‚   └── weights.npz
        β”œβ”€β”€ postag.zip
        └── spacy_ontonotes
            β”œβ”€β”€ features.msgpack
            └── weights.npz

7 directories, 23 files
  • Install pyenv command line tool for managing Python versions. Recommend installing via Homebrew.
# Install via Homebrew
brew install pyenv

# Install via official script
curl https://pyenv.run | bash

# Set shell environment after install
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc

2、Build the application

# Enter the `data` working directory
cd data

# Clone the `dev` branch of the repo
git clone -b dev https://github.com/dmMaze/BallonsTranslator.git

# Enter the `BallonsTranslator` working directory
cd BallonsTranslator

# Run the build script, will ask for password at pyinstaller step, enter password and press enter
sh scripts/build-macos-app.sh

πŸ“ŒThe packaged app is at ./data/BallonsTranslator/dist/BallonsTranslator.app, drag the app to macOS application folder to install. Ready to use out of box without extra Python config.