Skip to content

Commit

Permalink
Merge pull request #51 from davidberenstein1957/fix/zero-shot-ort-error
Browse files Browse the repository at this point in the history
Update classy_spacy.py
  • Loading branch information
davidberenstein1957 authored Nov 27, 2024
2 parents c16bc1d + 1968927 commit 9e7e838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classy_classification/classifiers/classy_spacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def set_classification_model(self, model: str = None, device: str = None):
self.pipeline = pipeline(
"zero-shot-classification", model=model, device=self.device, top_k=None, accelerator="ort"
)
except ImportError:
except Exception:
from transformers import pipeline

if self.device in ["gpu", "cuda", 0]:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "classy-classification"
version = "1.0.0"
version = "1.0.1"
description = "Have you every struggled with needing a Spacy TextCategorizer but didn't have the time to train one from scratch? Classy Classification is the way to go!"
authors = ["David Berenstein <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -32,6 +32,7 @@ spacy = {extras = ["transformers"], version = "^3.0"}
sentence-transformers = "^2.0"
scikit-learn = "^1.0"
pandas = ">=1,<2"
numpy = "<2"
transformers = {extras = ["torch"], version = ">4.20,<5"}
terminado = "<0.18"

Expand Down

0 comments on commit 9e7e838

Please sign in to comment.