Skip to content

Commit

Permalink
Update translation pipeline to migrate from deprecated HF Hub paramet…
Browse files Browse the repository at this point in the history
…er, closes #750
  • Loading branch information
davidmezzetti committed Jul 22, 2024
1 parent 6190f72 commit 3e97898
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
install = ["faiss-cpu>=1.7.1.post2", "torch>=1.12.1", "transformers>=4.28.0"]

# Required dependencies that are also transformers dependencies
install += ["huggingface-hub>=0.9.0", "numpy>=1.18.4", "pyyaml>=5.3", "regex>=2022.8.17"]
install += ["huggingface-hub>=0.19.0", "numpy>=1.18.4", "pyyaml>=5.3", "regex>=2022.8.17"]

# Optional dependencies
extras = {}
Expand Down
2 changes: 1 addition & 1 deletion src/python/txtai/pipeline/text/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def modelids(self):
list of source-target language model ids
"""

ids = [x.modelId for x in HfApi().list_models(author="Helsinki-NLP")] if self.findmodels else []
ids = [x.id for x in HfApi().list_models(author="Helsinki-NLP")] if self.findmodels else []
return set(ids)

def detect(self, texts):
Expand Down

0 comments on commit 3e97898

Please sign in to comment.