janvarev / oneringtranslator Goto Github PK
View Code? Open in Web Editor NEWSimple local REST web service to translate texts. Plugins. Automatic calculate BLEU/COMET metrics of translation quality.
License: MIT License
Simple local REST web service to translate texts. Plugins. Automatic calculate BLEU/COMET metrics of translation quality.
License: MIT License
I'm not very good with all these .py scripts, so please explain point by point what I have to do to make a translation using this: https://huggingface.co/JustFrederik/nllb-200-3.3B-ct2-float16
Collecting scipy<2.0.0,>=1.5.4 (from unbabel-comet->-r requirements-bleu.txt (line 4))
Downloading scipy-1.12.0-cp312-cp312-win_amd64.whl.metadata (60 kB)
---------------------------------------- 60.4/60.4 kB 3.3 MB/s eta 0:00:00
Collecting sentencepiece<0.2.0,>=0.1.96 (from unbabel-comet->-r requirements-bleu.txt (line 4))
Downloading sentencepiece-0.1.99.tar.gz (2.6 MB)
---------------------------------------- 2.6/2.6 MB 7.3 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\1\AppData\Local\Temp\pip-install-ltm1vmmr\sentencepiece_337e27456c864b6b852874a971dcc88b\setup.py", line 126, in <module>
subprocess.check_call([
File "E:\[Soft]\[MultiMedia]\OneRingTranslator-installer-main\installer_files\env\Lib\subprocess.py", line 408, in check_call
retcode = call(*popenargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\[Soft]\[MultiMedia]\OneRingTranslator-installer-main\installer_files\env\Lib\subprocess.py", line 389, in call
with Popen(*popenargs, **kwargs) as p:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\[Soft]\[MultiMedia]\OneRingTranslator-installer-main\installer_files\env\Lib\subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "E:\[Soft]\[MultiMedia]\OneRingTranslator-installer-main\installer_files\env\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] Не удается найти указанный файл
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
What should I do?
Hello, I have tried installing it using the following steps here . Also, when I click on start-webapi.bat it woks well I'm able to translate using this api request: http://127.0.0.1:4990/translate?text=Hi%21&from_lang=en&to_lang=fr getting result "Salut!" . I want to use fb_nllb_ctranslate2 plugin for translation, but each time I make request I get RuntimeError: Unable to open file 'model.bin' in model 'facebook/nllb-200-distilled-600M' . I don't know where facebook/nllb-200-distilled-600M should be created, I already have model.bin file??
Error init translation plugin fb_nllb_ctranslate2...
Traceback (most recent call last):
File "D:\NewNLLB\OneRingTranslator\oneringcore.py", line 80, in init_translator_engine
self.translators[translator_engine][0](self)
File "D:\NewNLLB\OneRingTranslator\plugins\plugin_fb_nllb_ctranslate2.py", line 269, in init
model = ctranslate2.Translator(core.plugin_options(modname).get("model"), device=to_device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Unable to open file 'model.bin' in model 'facebook/nllb-200-distilled-600M'
INFO: 127.0.0.1:50298 - "GET /translate?text=Hello&from_lang=eng_Latn&to_lang=sat_Olck&translator_plugin=fb_nllb_ctranslate2 HTTP/1.1" 200 OK
You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.
You can run openai migrate
to automatically upgrade your codebase to use the 1.0.0 interface.
If i run the automated migrate after that the plugin wont init anymore.
Could anyone fix the plugin so it is compatible with the new version?
Please, place here links and short descriptions of your own additional translation plugins.
Please, no discussion in this thread.
Hey,
Is there a way to keep new lines /
in the translated text?
Or did i miss something?
Can I use several models at the same time and do I need to add all of them manually if I want multiple language pairs?
Hi there,
Following up on the pull request for SillyTavern, I really liked your project and wondering if you could wrap it into a pip package so the translation service could be installed to any Python project. I would like including it into my ST-Extras project (https://github.com/SillyTavern/SillyTavern-extras) as an optional module to make a one-click install for users of ST and colabs.
If you need examples, here's Silero TTS server that was possible to be integrated thanks to that: https://github.com/ouoertheo/silero-api-server
Best wishes.
Any chance you might wrap this up to have a built in docker build file? It would make testing out and deploying this pretty standard and simple.
For people who make plugins it'd be pretty trivial to just provide what needs to be appended to the dockerfile and build it again.
Today I translated with OneRingTranslator with LunaTranslator from Japanese to Spanish and the text comes out in English.
Is there someone who uses that program who can help me with the configuration to translate from Japanese to Spanish
what I have to modify to make it work with the fb_nllb_translate translation model
(I once found a way to translate offline translation into Spanish with LunaTranslator but I don't remember I changed /: so it's possible)
Thanks in advance, it's something I'm trying to do because I know it's faster to translate online but it can be useful if my internet goes down.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.