undertheseanlp / underthesea

Underthesea - Vietnamese NLP Toolkit
http://undertheseanlp.com
GNU General Public License v3.0
1.37k stars 270 forks source link

Zero shot text classification model for Vietnamese using openai #682

Closed rain1024 closed 1 year ago

rain1024 commented 1 year ago

Text classification model for Vietnamese with zero-shot capabilities using OpenAI

Install dependencies

$ pip install underthesea[prompt]

Export API Key

export OPENAI_API_KEY=YOUR_KEY

Suggested API usage:

>>> from underthesea import classify
>>> text = "HLV ngoại đòi gần tỷ mỗi tháng dẫn dắt tuyển Việt Nam"
>>> classify(text, model='prompt')
Thể thao