{"id":13689812,"url":"https://github.com/fantinuoli/Local-NMT","last_synced_at":"2025-05-02T06:31:20.815Z","repository":{"id":181675922,"uuid":"442435962","full_name":"fantinuoli/Local-NMT","owner":"fantinuoli","description":"Deployable MT engine","archived":false,"fork":false,"pushed_at":"2022-12-12T17:45:10.000Z","size":149,"stargazers_count":19,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-12T15:43:11.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fantinuoli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-12-28T11:02:02.000Z","updated_at":"2024-09-24T22:53:56.000Z","dependencies_parsed_at":"2023-07-16T19:48:59.233Z","dependency_job_id":null,"html_url":"https://github.com/fantinuoli/Local-NMT","commit_stats":null,"previous_names":["fantinuoli/local-nmt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantinuoli%2FLocal-NMT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantinuoli%2FLocal-NMT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantinuoli%2FLocal-NMT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantinuoli%2FLocal-NMT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fantinuoli","download_url":"https://codeload.github.com/fantinuoli/Local-NMT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251998397,"owners_count":21677979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T16:00:27.831Z","updated_at":"2025-05-02T06:31:20.523Z","avatar_url":"https://github.com/fantinuoli.png","language":"HTML","funding_links":[],"categories":["Applications 💻"],"sub_categories":[],"readme":"# Run a pre-trained Huggingface Machine Translation engine with UI on your local computer\n\n## Installation\n\nYou need to have Python (3.8 or 3.9), [Tensorflow](https://www.tensorflow.org/install), [Torch](https://pytorch.org/get-started/locally/) and any VirtualEnv tool (in this example [pipenv](https://pypi.org/project/pipenv/)) installed on your machine. Please refer to the respective installation pages should you have any problem during installation.\n\nThe following supposes you are using `pipenv` as virtual environment management, but it will work with any other (just substitute `pipenv`with the usual way you install modules):\n\n- Clone the repository on your local machine (click on the `code` button and download as zip file. Unzip it in a known location.)\n- open Terminal/Shell\n- navigate to App directory\n- pipenv shell\n- pipenv install\n\nThis will install the required dependencies: flask, transformers, torch, sentencepiece. You can also install these modules manually with `pipenv install`and the name of the module.\n\nNote: I tested this on a macOS with Intel processor. I have not been able to install all dependencies on macOS with the new ARM/M1 processors. On macOS you may need to install `XCode` (you can install it freely from App Store). On Windows the same procedure should work out-of-the-box.  \n\n## Pre-trained translation models\nRefer to the [Huggingface](https://huggingface.co/Helsinki-NLP) page for a list of all pre-trained Helsinki MT models. See the language code of the model in the last two parts of the model name (for example `opus-mt-it-en` for Italian to English).\n\n## Run\n- modify the desired language combination directly in app.py, where `source_lang`is the language code for the source and `target_lang` for the target language (as in the model name). The corresponding language model will be automatically downloaded.\n- open Terminal/Shell\n- navigate to App directory\n- pipenv shell\n- python app.py\n- open Browser and copy and paste URL indicated in prompt (typically: http://127.0.0.1:5000/)\n\n## User Interface\n\n![alt text](screen.png?raw=true \"User Interface\")\n\n## License\nMIT\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantinuoli%2FLocal-NMT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffantinuoli%2FLocal-NMT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantinuoli%2FLocal-NMT/lists"}