Coder Social home page Coder Social logo

janvarev / oneringtranslator Goto Github PK

View Code? Open in Web Editor NEW
107.0 107.0 12.0 97 KB

Simple local REST web service to translate texts. Plugins. Automatic calculate BLEU/COMET metrics of translation quality.

License: MIT License

Python 96.92% HTML 1.76% JavaScript 1.31%

oneringtranslator's People

Contributors

cohee1207 avatar janvarev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

oneringtranslator's Issues

installations B problems

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?

RuntimeError: Unable to open file 'model.bin' in model 'facebook/nllb-200-distilled-600M'

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

OpenAI no longer supported

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?

External translation plugins

Please, place here links and short descriptions of your own additional translation plugins.

Please, no discussion in this thread.

[Feature Request] pip package

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.

Dockerfile?

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.

Error Translate Offine with a program

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.