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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mugees-1.0.0.tar.gz.
File metadata
- Download URL: mugees-1.0.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2309be80baef0bbce5d59753ca72be9c43dd1590b5f2785b11d0b9fd08884741
|
|
| MD5 |
c8205318f5f60f5a6eebcf09daac8da1
|
|
| BLAKE2b-256 |
fe5a5b8a373ad1ea11ac91d7264c32b40a5dc74d56eca27499e16b14b3c079f9
|
File details
Details for the file mugees-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mugees-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61e86e74b78a5f9f7bd2fe63192fb0c8e819efbd4a319d42c02b7598b35e6785
|
|
| MD5 |
5cb74647485ceaa32f99f02835ddf8de
|
|
| BLAKE2b-256 |
2ea137b004c6160186a6e93fd0aa0c42b4f5aea41561653387d193cff8094fed
|