-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature 0.6 #33
Merged
Merged
Feature 0.6 #33
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release v0.6.0
The main change is the introduction of a plugin manager to install the plugins+dependencies on demand.
This makes the release versions (both windows EXE and docker image) much smaller, and allow users to decide which functionalities they want to use.
IMPORTANT
From version 0.6 onward
python
andpip
need to be installed on the system.See more below in the Changes section.
Windows: https://www.python.org/downloads/windows/
Linux: Use your package manager (e.g.
sudo apt install python3 python3-pip
)Changes
For this reason I decided to axe the PyInstaller frozen EXE all together and go with a batch script that will:
venv
in the same directory as the scriptThe installed plugins can be controlled via the new version of the firefox extension or directly using the
manage_plugins/
endpoint.The plugins will by be installed under
$OCT_BASE_DIR/plugins
which by default will be under your user profile (e.g.C:\Users\username\.ocr_translate
on windows).If you have trouble with space under
C:\
consider setting theOCT_BASE_DIR
environment variable to a different location.The plugin data is stored in a JSON file inside the project plugins_data.json
Version/Scope/Extras of a package to be installed can be controlled via environment variables
(eg to change torch to version A.B.C you would set
OCT_PKG_TORCH_VERSION="A.B.C"
).If the package name contains a
-
it should be replaced with_min_
in the package nameRemoved env variable
AUTOCREATE_VALIDATED_MODELS
and relative server initialization.Now models are created/activated or deactivated via the plugin manager, when the respective plugin is installed/uninstalled.
run_server.py
script for initialization.ollama
(https://github.com/ollama/ollama) for translation using LLMsOCT_OLLAMA_ENDPOINT
environment variable to specify the endpoint of the ollama server(see the plugin page for more details)
PaddleOCR
(https://github.com/PaddlePaddle/PaddleOCR) (Box and OCR) (seems to work very wellwith chinese).
plugin_manager
ofpaddlepaddle
(2.5.2
on linux and2.6.1
on windows)might not work for every system as there can be underlying failures in the C++ code that the plugin uses.
The version installed can be controlled using the environment variable
OCT_PKG_PADDLEPADDLE_VERSION
.DJANGO_ALLOWED_HOSTS
and a server bind address via environment variables. (Fixes Access from other devices on local network #30)tokenizer
and aprocessor
from different models.run_tsl_xua
made to work withXUnity.AutoTranslator
(https://github.com/bbepis/XUnity.AutoTranslator)Fixes