Skip to main content

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


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)

Uploaded Source

Built Distribution

mugees-1.0.0-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

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