Instructions to use Unbabel/wmt22-cometkiwi-da with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- COMET
How to use Unbabel/wmt22-cometkiwi-da with COMET:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
TypeError: comet.models.utils.Prediction is not a dataclass
#2
by FrancescoBonzi - opened
Hi, I encountered an issue while running the model.predict with unbabel-comet==2.1.0 and unbabel-comet==2.0.2:
TypeError: comet.models.utils.Prediction is not a dataclasss. This is a subclass of ModelOutput and so must use the @dataclass decorator.
It works with unbabel-comet==2.0.1
Code:
from comet import download_model, load_from_checkpoint
model_path = download_model("Unbabel/wmt22-cometkiwi-da")
model = load_from_checkpoint(model_path)
data = [
{
"src": "10 ε° 15 ειε―δ»₯ιε°ε",
"mt": "Can I receive my food in 10 to 15 minutes?",
},
{
"src": "Pode ser entregue dentro de 10 a 15 minutos?",
"mt": "Can you send it for 10 to 15 minutes?",
}
]
model_output = model.predict(data, batch_size=8, gpus=1)
May you fix it?
Thanks,
Francesco
Working towards solving this. We already received a PR that seems to fix the issue.
Thanks π