rajeshradhakrishnan commited on
Commit
993f19b
1 Parent(s): 28ab382

Added the malayalam classify

Browse files

After cloning it to hugginglearners updated the model card and added the pipelinetag for widget

Files changed (1) hide show
  1. README.md +48 -10
README.md CHANGED
@@ -1,21 +1,46 @@
1
  ---
2
  tags:
3
  - fastai
 
 
4
  ---
5
 
6
- # Amazing!
7
 
8
- 🥳 Congratulations on hosting your fastai model on the Hugging Face Hub!
9
 
10
- # Some next steps
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
- 2. Create a demo in Gradio or Streamlit using 🤗 Spaces ([documentation here](https://huggingface.co/docs/hub/spaces)).
14
 
15
- 3. Join the fastai community on the [Fastai Discord](https://discord.com/invite/YKrxeNn)!
16
 
17
- Greetings fellow fastlearner 🤝! Don't forget to delete this content from your model card.
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  ---
21
 
@@ -23,10 +48,23 @@ Greetings fellow fastlearner 🤝! Don't forget to delete this content from your
23
  # Model card
24
 
25
  ## Model description
26
- More information needed
27
 
28
  ## Intended uses & limitations
29
- More information needed
30
 
31
  ## Training and evaluation data
32
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  tags:
3
  - fastai
4
+ pipeline_tag:
5
+ - text-classification
6
  ---
7
 
8
+ # Malayalam (മലയാളം) Classifier using fastai (Working in Progress)
9
 
10
+ 🥳 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)
11
 
12
+ 🌈 മലയാളത്തിൽ മെഷീൻ ലീർണിങ് പഠിക്കാനും പിന്നേ പരിചയപ്പെടാനും, to be continued...
 
13
 
14
+ # How its built ? & How to use ?
15
 
16
+ 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
17
 
18
+ Usage:
19
 
20
+ First, install the utilities to load the model as well as `blurr`, which was used to train this model.
21
+
22
+ ```bash
23
+ !pip install huggingface_hub[fastai]
24
+ !git clone https://github.com/ohmeow/blurr.git && cd blurr && pip install -e ".[dev]"
25
+ ```
26
+
27
+ ```python
28
+ from huggingface_hub import from_pretrained_fastai
29
+ learner = from_pretrained_fastai("rajeshradhakrishnan/ml-news-classify-fastai")
30
+
31
+
32
+ sentences = ["ഓഹരി വിപണി തകരുമ്പോള്‍ നിക്ഷേപം എങ്ങനെ സുരക്ഷിതമാക്കാം",
33
+ "വാര്‍ണറുടെ ഒറ്റക്കയ്യന്‍ ക്യാച്ചില്‍ അമ്പരന്ന് ക്രിക്കറ്റ് ലോകം"]
34
+
35
+ probs = learner.predict(sentences)
36
+ # 'business', 'entertainment', 'sports', 'technology'
37
+ for idx in range(len(sentences)):
38
+ print(f"Probability that sentence '{sentences[idx]}' is business is: {100*probs[idx]['probs'][0]:.2f}%")
39
+ print(f"Probability that sentence '{sentences[idx]}' is entertainment is: {100*probs[idx]['probs'][1]:.2f}%")
40
+ print(f"Probability that sentence '{sentences[idx]}' is sports is: {100*probs[idx]['probs'][2]:.2f}%")
41
+ print(f"Probability that sentence '{sentences[idx]}' is technology is: {100*probs[idx]['probs'][3]:.2f}%")
42
+
43
+ ```
44
 
45
  ---
46
 
 
48
  # Model card
49
 
50
  ## Model description
51
+ The is a Malayalam classifier model for labels 'business', 'entertainment', 'sports', 'technology'.
52
 
53
  ## Intended uses & limitations
54
+ The model can be used to categorize malayalam new sfeed.
55
 
56
  ## Training and evaluation data
57
+
58
+ 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))!.
59
+
60
+ ## Citation
61
+
62
+
63
+ ```
64
+ @article{kunchukuttan2020indicnlpcorpus,
65
+ title={AI4Bharat-IndicNLP Corpus: Monolingual Corpora and Word Embeddings for Indic Languages},
66
+ author={Anoop Kunchukuttan and Divyanshu Kakwani and Satish Golla and Gokul N.C. and Avik Bhattacharyya and Mitesh M. Khapra and Pratyush Kumar},
67
+ year={2020},
68
+ journal={arXiv preprint arXiv:2005.00085},
69
+ }
70
+ ```