Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/NeonGeckoCom/neon_utterance_zeroshot_clf_plugin


https://github.com/NeonGeckoCom/neon_utterance_zeroshot_clf_plugin

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

```python
tars = TarsZeroShotClassifier()

# NOTE: this usually comes from config and is not set like this
tars.classifiers = {"sentiment": ["happy", "sad"]}

utts = ["I am so glad you liked it!",
"I get really sad when nobody reviews my PRs"]

_, context = tars.transform(utts)

# context is a dict of clf_name: [prediction(utt) for utt in utterances]
print(context)
# {'zeroshot_classifier':
# {'sentiment': [[('happy', 0.8667009472846985)], [('sad', 0.9921779036521912)]]}}
```