39 Commits

Author SHA1 Message Date
Piero Toffanin
2936336bf8 Update apscheduler 2025-12-04 13:17:12 -05:00
Piero Toffanin
3eee6c437c Fix installation on Python 3.13, 3.14 2025-12-04 12:46:14 -05:00
Piero Toffanin
fce08218b4 Remove sessions 2025-12-04 12:30:02 -05:00
Piero Toffanin
a211473b62 Loosen pytorch dependency 2025-12-03 21:01:47 -05:00
Piero Toffanin
16413e3d5d Revert argos update 2025-11-28 13:35:27 -05:00
Piero Toffanin
cc8ac3ecc5 Fix torch version for Python < 3.12 2025-11-16 13:56:32 -05:00
Benjamin Loison
52e38353d7
Update argos-translate to 1.10.0
Otherwise face `KeyError: 'default_dependencies'` in `stanza`:

```
libretranslate
```
<details>
<summary>Output:</summary>

```
/home/benjamin_loison/venv/lib/python3.13/site-packages/apscheduler/__init__.py:1: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import get_distribution, DistributionNotFound
Running on http://127.0.0.1:5000
WARNING:waitress.queue:Task queue depth is 1
WARNING:waitress.queue:Task queue depth is 2
WARNING:waitress.queue:Task queue depth is 2
WARNING:waitress.queue:Task queue depth is 2
WARNING:waitress.queue:Task queue depth is 2
ERROR:libretranslate.app:Exception on /translate [POST]
Traceback (most recent call last):
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/libretranslate/app.py", line 404, in time_func
    return func(*a, **kw)
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/libretranslate/app.py", line 378, in func
    return f(*a, **kw)
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/libretranslate/app.py", line 831, in translate
    raise e
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/libretranslate/app.py", line 815, in translate
    hypotheses = translator.hypotheses(q, num_alternatives + 1)
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/argostranslate/translate.py", line 296, in hypotheses
    translated_paragraph = self.underlying.hypotheses(
        paragraph, num_hypotheses
    )
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/argostranslate/translate.py", line 173, in hypotheses
    apply_packaged_translation(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.pkg, paragraph, self.translator, num_hypotheses
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/argostranslate/translate.py", line 418, in apply_packaged_translation
    stanza_pipeline = stanza.Pipeline(
        lang=pkg.from_code,
    ...<3 lines>...
        logging_level="WARNING",
    )
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/stanza/pipeline/core.py", line 83, in __init__
    self.load_list = add_dependencies(resources, lang, self.load_list) if lang in resources else []
                     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.13/site-packages/stanza/resources/common.py", line 213, in add_dependencies
    default_dependencies = resources[lang]['default_dependencies']
                           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'default_dependencies'
```
</details>
2025-11-15 19:18:47 +01:00
Val Lorentz
fdf74c9210 Add support for Python 3.13 2025-08-31 12:03:11 +02:00
Piero Toffanin
80a757dce1 PDF support 2025-07-31 11:04:46 -04:00
roshan
6522182d4a Update Requirements: argos-translate-files srt support 2025-04-17 09:30:34 +09:00
Piero Toffanin
ebbba3e4f6 Update lexilang 2025-03-28 14:24:26 -04:00
Piero Toffanin
f36677a164 Update lexilang 2025-01-17 23:11:57 -05:00
Piero Toffanin
243729292e Upgrade torch 2025-01-17 09:49:15 -05:00
Urtzi Odriozola
c51266ba55
Upgrade Lexilang package to the last version
Upgrade Lexilang package dependency to the last version in order to detect basque language sentences
2025-01-17 15:41:25 +01:00
Piero Toffanin
039f878f7f Bump argos-translate-files, fix src_lang initialization, checks 2024-10-28 16:10:27 -04:00
Piero Toffanin
4df642cc29 Set numpy < 2 2024-09-21 12:24:10 -04:00
Piero Toffanin
153ac8e3c8 Set numpy < 2 2024-09-21 12:23:50 -04:00
Piero Toffanin
106594f970 Remove ruff 2024-09-21 12:04:20 -04:00
P.J. Finlay
9dde1e0142
Upgrade to Argos Translate v1.9.6
- Upgrade CTranslate2 to v4 for CUDA 12 support (https://github.com/argosopentech/argos-translate/pull/404)
- Fix deprecation error for CTranslate2 TranslationResult (https://github.com/argosopentech/argos-translate/pull/404)
2024-04-30 16:46:20 -05:00
P.J. Finlay
c8360d0359 Update Argos Translate to v1.9.4
This fixes an issue in SentencePiece where the packaging is broken for newer versions of Python.

https://github.com/argosopentech/argos-translate/issues/405
2024-04-29 14:41:12 -05:00
Piero Toffanin
0a83fd29bd Include mo files 2024-04-22 13:13:47 -04:00
Jennifer Cwagenberg
51341d92ad build(sca): 🔒 update dependencies to address security issues 2024-01-08 08:42:21 -06:00
Piero Toffanin
5120f122f1 Pin torch to 2.0.1 2023-11-15 13:11:52 -05:00
Piero Toffanin
02ea8ae011 Switch linguars for langdetect 2023-10-30 20:39:30 -04:00
Piero Toffanin
6ff5bba000 Add lexilang for language detection on short texts 2023-10-30 12:52:33 -04:00
Piero Toffanin
6c5fa2a4ee Use lingua for language detection 2023-10-30 00:03:00 -04:00
Piero Toffanin
27e6535014 Update argostranslate 2023-10-21 10:27:57 -04:00
Piero Toffanin
c256359ec2 Update argostranslate 2023-10-19 06:25:11 -04:00
P.J. Finlay
9697543666 Update CTranslate2 to v3
Update to Argos Translate 1.8.2 with CTranslate2 3.20.0

https://github.com/argosopentech/argos-translate/pull/364
2023-09-30 14:06:24 -05:00
Robert George
94f63cedda
Use package.version for model version comparison
Change `--install-models` to `--force-update-models`
2023-09-29 15:31:33 -07:00
P.J. Finlay
c72cfc1e08 Upgrade argos-translate-files to 1.1.4
This version of Argos Translate Files improves
translation of EPUB ebook documents.

81daf76492
2023-08-05 15:56:28 -05:00
Vincent Emonet
25168ba6e1 Add pre-commit to automatically run formatting when committing 2023-07-23 13:24:15 +02:00
Vincent Emonet
a1eb871bb6 Edit publish workflow to reuse existing test workflow, and use the build package to build the libretranslate package 2023-07-10 08:11:51 +02:00
Vincent Emonet
1c0fb597fb Fixed some ruff warnings: requests without timeout and naming not complying with PEP 2023-07-09 12:38:03 +02:00
Vincent Emonet
bf18dcbcf9 run ruff formatting 2023-07-09 12:29:11 +02:00
Vincent Emonet
62712dcad3 improve ruff config 2023-07-09 12:23:48 +02:00
Vincent Emonet
0e404b5ee3 update contributing to provide instructions to run script using hatch 2023-07-09 12:18:58 +02:00
Vincent Emonet
19fb149112 Update checkout and setup-python actions version in workflow and improve ruff config 2023-07-09 11:43:58 +02:00
Vincent Emonet
f0943dada1 Upgrade project config to use a pyproject.toml file for the package metadata and tool configs (PEP 621), and the hatch build-system. Remove requirements.txt and setup.py 2023-07-09 11:35:53 +02:00