A python library for detecting depressive comments
Project description
Mugees
Depression Comment Classification with Transformers
Dependencies:
- For inference:
- Transformers
- Pytorch lightning
- For training will also need:
- Kaggle API (to download data)
install mugees
pip install mugees
python
from mugees import Depression
# each model takes in either a string or a list of strings
results = Depression('original').predict('example text')
results = Depression('unbiased').predict(['example text 1','example text 2'])
results = Depression('multilingual').predict(['example text','exemple de texte','texto de ejemplo','testo di esempio','texto de exemplo','örnek metin','пример текста'])
# to specify the device the model will be allocated on (defaults to cpu), accepts any torch.device input
model = Depression('original', device='cuda')
# optional to display results nicely (will need to pip install pandas)
import pandas as pd
print(pd.DataFrame(results, index=input_text).round(5))
Importing mugees in python:
python
from mugees import Depression
results = Depression('original').predict('some text')
results = Depression('unbiased').predict(['example text 1','example text 2'])
results = Depression('multilingual').predict(['example text','exemple de texte','texto de ejemplo','testo di esempio','texto de exemplo','örnek metin','пример текста'])
# to display results nicely
import pandas as pd
print(pd.DataFrame(results,index=input_text).round(5))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mugees-1.0.0.tar.gz
(8.0 kB
view hashes)
Built Distribution
mugees-1.0.0-py3-none-any.whl
(8.5 kB
view hashes)