Skip to main content

Zero-shot classification package using Transformers

Project description

from classifierPratik import ZeroShotClassifier

Initialize the classifier

clf = ZeroShotClassifier()

Define your text and candidate labels

text = "Book me a flight to Paris" labels = ["healthcare", "travel", "not_answerable"]

Predict the best label

best_label = clf.predict(text, labels) print(best_label) # Output: "travel"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

classifierpratik-0.0.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

classifierpratik-0.0.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file classifierpratik-0.0.3.tar.gz.

File metadata

  • Download URL: classifierpratik-0.0.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for classifierpratik-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bb1e543cdfbcfdf2d2c79034cab74e44b28f1306bd62d73101ed2ba875eceb34
MD5 54ccac4872169ba66893ee0fa8271da1
BLAKE2b-256 6f9e707a788b4b400b14a4b59421ad5a34180bbe6d4f2cfe3d289fd6412d913b

See more details on using hashes here.

File details

Details for the file classifierpratik-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for classifierpratik-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a5b76e06f0ba751ac2b5611622e299376f2dc7ea640d2855308f0e70550bd02a
MD5 5c0f03ec3bfa963129c358fc1264da39
BLAKE2b-256 2193aeeee0673583bbc836c080ced412fbbe59b73a034ba4c437e9368f4cb4e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page