Commit
·
da94138
1
Parent(s):
79331a2
updated with more info
Browse files
README.md
CHANGED
|
@@ -3,19 +3,35 @@ tags:
|
|
| 3 |
- fastai
|
| 4 |
---
|
| 5 |
|
| 6 |
-
#
|
| 7 |
|
| 8 |
-
🥳
|
| 9 |
|
| 10 |
-
|
| 11 |
-
1. Fill out this model card with more information (see the template below and the [documentation here](https://huggingface.co/docs/hub/model-repos))!
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
---
|
| 21 |
|
|
@@ -23,10 +39,23 @@ Greetings fellow fastlearner 🤝! Don't forget to delete this content from your
|
|
| 23 |
# Model card
|
| 24 |
|
| 25 |
## Model description
|
| 26 |
-
The is a Malayalam classifier model for labels 'business', 'entertainment', 'sports', 'technology'
|
| 27 |
|
| 28 |
## Intended uses & limitations
|
| 29 |
-
|
| 30 |
|
| 31 |
## Training and evaluation data
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
- fastai
|
| 4 |
---
|
| 5 |
|
| 6 |
+
# Malayalam (മലയാളം) Classifier using fastai (Working in Progress)
|
| 7 |
|
| 8 |
+
🥳 This model is my attempt to use machine learning using Malayalam Language. Huge inspiration from [Malayalam Text Classifier](https://kurianbenoy.com/2022-05-30-malayalamtext-0/). Courtesy to @waydegilliam for [blurr](https://ohmeow.github.io/blurr/text-examples-multilabel.html)
|
| 9 |
|
| 10 |
+
🌈 മലയാളത്തിൽ മെഷീൻ ലീർണിങ് പഠിക്കാനും പിന്നേ പരിചയപ്പെടാനും, to be continued...
|
|
|
|
| 11 |
|
| 12 |
+
# How its built ? & How to use ?
|
| 13 |
|
| 14 |
+
Please find the [notebook](https://nbviewer.org/github/rajeshradhakrishnanmvk/kitchen2.0/blob/feature101-frontend/ml/fastai_X_Hugging_Face_Group_2022.ipynb) used for training the model
|
| 15 |
|
| 16 |
+
Usage:
|
| 17 |
|
| 18 |
+
```
|
| 19 |
+
from huggingface_hub import from_pretrained_fastai
|
| 20 |
+
learner = from_pretrained_fastai(rajeshradhakrishnan/ml-news-classify-fastai)
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
sentences = ["ഓഹരി വിപണി തകരുമ്പോള് നിക്ഷേപം എങ്ങനെ സുരക്ഷിതമാക്കാം",
|
| 24 |
+
"വാര്ണറുടെ ഒറ്റക്കയ്യന് ക്യാച്ചില് അമ്പരന്ന് ക്രിക്കറ്റ് ലോകം"]
|
| 25 |
+
|
| 26 |
+
probs = learner.predict(sentences)
|
| 27 |
+
# 'business', 'entertainment', 'sports', 'technology'
|
| 28 |
+
for idx in range(len(sentences)):
|
| 29 |
+
print(f"Probability that sentence '{sentences[idx]}' is business is: {100*probs[idx]['probs'][0]:.2f}%")
|
| 30 |
+
print(f"Probability that sentence '{sentences[idx]}' is entertainment is: {100*probs[idx]['probs'][1]:.2f}%")
|
| 31 |
+
print(f"Probability that sentence '{sentences[idx]}' is sports is: {100*probs[idx]['probs'][2]:.2f}%")
|
| 32 |
+
print(f"Probability that sentence '{sentences[idx]}' is technology is: {100*probs[idx]['probs'][3]:.2f}%")
|
| 33 |
+
|
| 34 |
+
```
|
| 35 |
|
| 36 |
---
|
| 37 |
|
|
|
|
| 39 |
# Model card
|
| 40 |
|
| 41 |
## Model description
|
| 42 |
+
The is a Malayalam classifier model for labels 'business', 'entertainment', 'sports', 'technology'.
|
| 43 |
|
| 44 |
## Intended uses & limitations
|
| 45 |
+
The model can be used to categorize malayalam new sfeed.
|
| 46 |
|
| 47 |
## Training and evaluation data
|
| 48 |
+
|
| 49 |
+
Data is from the [AI4Bharat-IndicNLP Dataset](https://github.com/AI4Bharat/indicnlp_corpus#indicnlp-news-article-classification-dataset) and wrapper to extract only Malayalam data( [HF dataset](https://huggingface.co/datasets/rajeshradhakrishnan/malayalam_news))!.
|
| 50 |
+
|
| 51 |
+
## Citation
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
```
|
| 55 |
+
@article{kunchukuttan2020indicnlpcorpus,
|
| 56 |
+
title={AI4Bharat-IndicNLP Corpus: Monolingual Corpora and Word Embeddings for Indic Languages},
|
| 57 |
+
author={Anoop Kunchukuttan and Divyanshu Kakwani and Satish Golla and Gokul N.C. and Avik Bhattacharyya and Mitesh M. Khapra and Pratyush Kumar},
|
| 58 |
+
year={2020},
|
| 59 |
+
journal={arXiv preprint arXiv:2005.00085},
|
| 60 |
+
}
|
| 61 |
+
```
|