vascosmota / HelloWorld

0 stars 0 forks source link

Helsinki-NLP/opus-mt-gmw-en translation task problem #1

Open vascosmota opened 10 months ago

vascosmota commented 10 months ago

Dependencies installed on the virtual environment

dependencies = [
    "pandas",
    "numpy",
    "nltk",
    "deep_translator",
    "spacy",
    "transformers",
    "tensorflow",
    "sentencepiece",
]
from transformers import pipeline
import pandas as pd

pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-gmw-en")
pipe(["Het hoofdkantoor van Google is gevestigd in Mountain View, Californië.", "Mark Rutte is de premier van Nederland."])
# [{'translation_text': 'This is the largest in the world, and the largest in the world, and the largest in the world, is the largest in the world, and the largest in the world, and the largest in the world, and the largest in the world, in the world, is the largest in the world, and the largest in the world, and the largest in the world, and the largest in the world, and the largest in the world, and the largest in the world, the largest in the world, with the largest in the world, and the largest in the world, and the largest in the world, and the largest in the world, and the largest in the world, with the highest growth in the world, the highest growth in the world, and the highest growth in the world, and the highest growth in the world, with the highest growth in the world, and a high growth in the world, and a high growth in the world, and a high growth in the world, and a high growth in the world, and a high growth in the world, and a high growth in the world, and a wide range of the world, and a wide range of the world, and a wide range of growth in the world, and a wide range of the economy, the.'}]
vascosmota commented 10 months ago

Strangely, using the model on HuggingFace website works as expected.

Screenshot 2024-01-11 at 18 33 29

vascosmota commented 10 months ago

System:

> os.uname()
posix.uname_result(sysname='Darwin', nodename='Vascos-MacBook-Pro.local', release='22.5.0', version='Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:44 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T8103', machine='arm64')

Python version

$ python --version
Python 3.8.13

Python packages installed

(.venv_no_conn) ➜  qntq-model-comm-sentiment git:(ENG-558) ✗ pip list                                                
Package                   Version      Editable project location
------------------------- ------------ ------------------------------------------------------------------------------
absl-py                   2.0.0
astunparse                1.6.3
beautifulsoup4            4.12.2
blis                      0.7.11
cachetools                5.3.2
catalogue                 2.0.10
certifi                   2023.11.17
charset-normalizer        3.3.2
click                     8.1.7
cloudpathlib              0.16.0
confection                0.1.4
cymem                     2.0.8
deep-translator           1.11.4
filelock                  3.13.1
flatbuffers               23.5.26
fsspec                    2023.12.2
gast                      0.4.0
google-auth               2.26.2
google-auth-oauthlib      1.0.0
google-pasta              0.2.0
grpcio                    1.60.0
h5py                      3.10.0
huggingface-hub           0.20.2
idna                      3.6
importlib-metadata        7.0.1
Jinja2                    3.1.3
joblib                    1.3.2
keras                     2.13.1
langcodes                 3.3.0
libclang                  16.0.6
Markdown                  3.5.2
MarkupSafe                2.1.3
murmurhash                1.0.10
nltk                      3.8.1
numpy                     1.24.3
oauthlib                  3.2.2
opt-einsum                3.3.0
packaging                 23.2
pandas                    2.0.3
pip                       22.0.3
preshed                   3.0.9
protobuf                  4.25.2
pyasn1                    0.5.1
pyasn1-modules            0.3.0
pydantic                  1.10.13
python-dateutil           2.8.2
pytz                      2023.3.post1
PyYAML                    6.0.1
qntq-model-comm-sentiment 0.1.0        /Users/vascomota/Documents/GitHub/qntq-pkg-models-nb/qntq-model-comm-sentiment
regex                     2023.12.25
requests                  2.31.0
requests-oauthlib         1.3.1
rsa                       4.9
safetensors               0.4.1
sentencepiece             0.1.99
setuptools                60.9.3
six                       1.16.0
smart-open                6.4.0
soupsieve                 2.5
spacy                     3.7.2
spacy-legacy              3.0.12
spacy-loggers             1.0.5
srsly                     2.4.8
tensorboard               2.13.0
tensorboard-data-server   0.7.2
tensorflow                2.13.0
tensorflow-estimator      2.13.0
tensorflow-macos          2.13.0
termcolor                 2.4.0
thinc                     8.2.2
tokenizers                0.15.0
tqdm                      4.66.1
transformers              4.36.2
typer                     0.9.0
typing_extensions         4.5.0
tzdata                    2023.4
urllib3                   2.1.0
wasabi                    1.1.2
weasel                    0.3.4
Werkzeug                  3.0.1
wheel                     0.37.1
wrapt                     1.16.0
zipp                      3.17.0