hassiahk commited on
Commit
af35c1b
1 Parent(s): 1e8ecc2

Moving news article links to the bottom

Browse files
Files changed (1) hide show
  1. apps/classifier.py +46 -23
apps/classifier.py CHANGED
@@ -21,38 +21,42 @@ def app():
21
  st.title("मराठी Marathi News Classifier")
22
 
23
  st.markdown(
24
- "This demo uses the below fine-tuned models for marathi news classification:\n"
 
25
  "- [IndicNLP Marathi News Classifier](https://huggingface.co/flax-community/mr-indicnlp-classifier) fine-tuned on "
26
- "[IndicNLP Marathi News Dataset](https://github.com/ai4bharat/indicnlp_corpus#indicnlp-news-article-classification-dataset)\n\n"
 
 
27
  "> `IndicNLP` model predicts one of these 3 classes - `['lifestyle', 'entertainment', 'sports']`"
28
- "\n\n"
 
 
29
  "- [iNLTK Marathi News Classifier](https://huggingface.co/flax-community/mr-inltk-classifier) fine-tuned on "
30
- "[Marathi News Dataset](https://www.kaggle.com/disisbig/marathi-news-dataset)\n\n"
 
 
31
  "> `iNLTK` model predicts one of these 3 classes - `['state', 'entertainment', 'sports']`"
32
  )
33
 
34
- st.markdown(
35
- "❓ Can't figure out where to get a sample text other than the predefined ones? ❓\n\n We have provided "
36
- "Marathi newspaper links (section wise) below. Head over to any section of your choice, "
37
- "copy any headline and paste below to see if the model is predicting the respective class correctly or not?\n"
38
- "- [entertainment](https://maharashtratimes.com/entertainment/articlelist/19359255.cms)\n"
39
- "- [sports](https://maharashtratimes.com/sports/articlelist/2429056.cms)\n"
40
- "- [lifestyle](https://maharashtratimes.com/lifestyle-news/articlelist/2429025.cms)\n"
41
- "- [state](https://maharashtratimes.com/maharashtra/articlelist/2429066.cms)\n\n"
42
- "> 📒 NOTE: Both models are not trained on above headlines! Feel free to use any headline from any newspaper"
43
- )
44
-
45
  classifier = st.sidebar.selectbox("Select a Model", index=0, options=["IndicNLP", "iNLTK"])
46
 
47
  st.sidebar.markdown(
48
- "**IndicNLP Classes**\n"
49
- "- lifestyle\n"
50
- "- entertainment\n"
51
- "- sports\n"
52
- "\n"
53
- "**iNLTK Classes**\n"
54
- "- state\n"
55
- "- entertainment\n"
 
 
 
 
 
 
 
 
56
  "- sports"
57
  )
58
 
@@ -76,3 +80,22 @@ def app():
76
 
77
  st.markdown("## Predicted Label: `{}`".format(result[0]["label"]))
78
  st.markdown("## Confidence: `{}`%".format(round(result[0]["score"], 3)*100))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  st.title("मराठी Marathi News Classifier")
22
 
23
  st.markdown(
24
+ "This demo uses the below fine-tuned models for marathi news classification:\
25
+ "
26
  "- [IndicNLP Marathi News Classifier](https://huggingface.co/flax-community/mr-indicnlp-classifier) fine-tuned on "
27
+ "[IndicNLP Marathi News Dataset](https://github.com/ai4bharat/indicnlp_corpus#indicnlp-news-article-classification-dataset)\
28
+ \
29
+ "
30
  "> `IndicNLP` model predicts one of these 3 classes - `['lifestyle', 'entertainment', 'sports']`"
31
+ "\
32
+ \
33
+ "
34
  "- [iNLTK Marathi News Classifier](https://huggingface.co/flax-community/mr-inltk-classifier) fine-tuned on "
35
+ "[Marathi News Dataset](https://www.kaggle.com/disisbig/marathi-news-dataset)\
36
+ \
37
+ "
38
  "> `iNLTK` model predicts one of these 3 classes - `['state', 'entertainment', 'sports']`"
39
  )
40
 
 
 
 
 
 
 
 
 
 
 
 
41
  classifier = st.sidebar.selectbox("Select a Model", index=0, options=["IndicNLP", "iNLTK"])
42
 
43
  st.sidebar.markdown(
44
+ "**IndicNLP Classes**\
45
+ "
46
+ "- lifestyle\
47
+ "
48
+ "- entertainment\
49
+ "
50
+ "- sports\
51
+ "
52
+ "\
53
+ "
54
+ "**iNLTK Classes**\
55
+ "
56
+ "- state\
57
+ "
58
+ "- entertainment\
59
+ "
60
  "- sports"
61
  )
62
 
 
80
 
81
  st.markdown("## Predicted Label: `{}`".format(result[0]["label"]))
82
  st.markdown("## Confidence: `{}`%".format(round(result[0]["score"], 3)*100))
83
+
84
+ st.markdown(
85
+ "❓ Can't figure out where to get a sample text other than the predefined ones? ❓\
86
+ \
87
+ We have provided "
88
+ "Marathi newspaper links (section wise) below. Head over to any section of your choice, "
89
+ "copy any headline and paste below to see if the model is predicting the respective class correctly or not?\
90
+ "
91
+ "- [entertainment](https://maharashtratimes.com/entertainment/articlelist/19359255.cms)\
92
+ "
93
+ "- [sports](https://maharashtratimes.com/sports/articlelist/2429056.cms)\
94
+ "
95
+ "- [lifestyle](https://maharashtratimes.com/lifestyle-news/articlelist/2429025.cms)\
96
+ "
97
+ "- [state](https://maharashtratimes.com/maharashtra/articlelist/2429066.cms)\
98
+ \
99
+ "
100
+ "> 📒 NOTE: Both models are not trained on above headlines! Feel free to use any headline from any newspaper"
101
+ )