
- #TAB BROWSER EXTENSIONS HOW TO#
- #TAB BROWSER EXTENSIONS DOWNLOAD#
This section assumes you have docker installed and the image of the project.
#TAB BROWSER EXTENSIONS HOW TO#
See the section on how to install from DockerHUB first.
From here follow the same instructions as when starting from Github. urls.py: Include the 'ocr_translate.urls' into your project urls. settings.py: Add the ocr_translated app to the INSTALLED_APPS. urls.py with the one available on the repo. settings.py with the one available on the repo. Configure the server by replacing the automatically created files (strongly recommended):. Run django-admin startproject mysite to create a django project. These are the minimal instruction for creating a project and start running the server: This will need to be integrated in a Django project in order to be used. When installing the project from PyPI, only the app is available. See the section on how to install from PyPI first. Running more than one worker per loaded model concurrently might slow down the actual computation and in some case also block the execution. Django development server will spawn new threads for handling incoming requests (if no currently existing thread is free), which share the same memory. This can quickly fill up the memory especially if running on GPU. Gunicorn workers will each spawn a separate instance of the loaded models, each taking its own space in the memory. Check the Dockerfile, as this is what the provided image makes use of.Īt least for the first time, it is suggested to run the server with the Environment variables AUTOCREATE_LANGUAGES and AUTOCREATE_VALIDATED_MODELS set to "true" to automatically load the validated languages and models provided by the project. The suggested PORT would be 4000 as it is the one set by default in the extension. From inside the project directory: python manage.py runserver PORT. This is more oriented for developing than deploying, but is fine for a self-hosted single-user server accepting connections only on localhost Run the server using for example one of the following options: The Github repo provides not only the Django app files, but also the already configured project files used to start the server.Ĭreate/Initialize your database by running See the section on how to install from Github first. Most notably the models files and database will be downloaded/created under %userprofile%/.ocr_translate.Īlso the gpu version will attempt to run on GPU by default, and fall-back to CPU if the former is not available.įor customization, you can set the environment variable yourself, either via powershell or by searching for environment variable in the settings menu. The server will run with sensible defaults. Unzip the file and from inside the folder, run the run_server-XXX.exe file (XXX=cpu/gpu)
The GPU version split in file 1 and file 2 (The CUDA dependencies makes it take much more space), wich can be restored using tools like 7zip and NanaZip. #TAB BROWSER EXTENSIONS DOWNLOAD#
From Release fileįrom the github releases page you can download either: You will also have to modify the ALLOWED_HOSTS in case you plan to access the server from somewhere other than localhost.Īll the different way to run the server may provide different set of default values (each of them is targeted for a different level of usage).
See below for a list of supported databases database, or model location), you can either: If you plan to use a different settings (eg. The server is designed to be used together with this browser extension, acting as a front-end providing the images and controlling the model languages and models being used. The OCR and translation is performed using freely available machine learning models and packages (see below for what is currently implemented). This is a Django app for creating back-end server aimed at performing OCR and translation of images received via a POST request.