Spaces:
Runtime error
Runtime error
UI enhancements
Browse files- apps/classifier.py +15 -17
- apps/mlm.py +1 -1
apps/classifier.py
CHANGED
@@ -18,16 +18,23 @@ def load_model(input_text, model_name_or_path):
|
|
18 |
|
19 |
|
20 |
def app():
|
21 |
-
st.title("
|
22 |
|
23 |
st.markdown(
|
24 |
-
"This demo uses
|
25 |
-
"
|
|
|
|
|
|
|
|
|
26 |
)
|
27 |
|
|
|
|
|
|
|
28 |
st.markdown(
|
29 |
-
"Can't figure out where to get a sample text? Visit any of the following links,
|
30 |
-
"the model is predicting the respective class or not.\n"
|
31 |
"- [entertainment](https://maharashtratimes.com/entertainment/articlelist/19359255.cms)\n"
|
32 |
"- [sports](https://maharashtratimes.com/sports/articlelist/2429056.cms)\n"
|
33 |
"- [lifestyle](https://maharashtratimes.com/lifestyle-news/articlelist/2429025.cms)\n"
|
@@ -36,25 +43,16 @@ def app():
|
|
36 |
|
37 |
classifier = st.sidebar.selectbox("Select a Model", index=0, options=["IndicNLP", "iNLTK"])
|
38 |
|
39 |
-
st.sidebar.markdown(
|
40 |
-
"- [IndicNLP Marathi News Classifier](https://huggingface.co/flax-community/mr-indicnlp-classifier) fine-tuned on "
|
41 |
-
"[Indic NLP Corpus for Marathi](https://github.com/ai4bharat/indicnlp_corpus#indicnlp-news-article-classification-dataset)"
|
42 |
-
"\n"
|
43 |
-
"- [iNLTK Marathi News Classifier](https://huggingface.co/flax-community/mr-inltk-classifier) fine-tuned on "
|
44 |
-
"[Marathi News Dataset](https://www.kaggle.com/disisbig/marathi-news-dataset)"
|
45 |
-
)
|
46 |
-
st.sidebar.markdown("\n")
|
47 |
-
|
48 |
st.sidebar.markdown(
|
49 |
"**IndicNLP Classes**\n"
|
|
|
50 |
"- entertainment\n"
|
51 |
"- sports\n"
|
52 |
-
"- lifestyle\n"
|
53 |
"\n"
|
54 |
"**iNLTK Classes**\n"
|
|
|
55 |
"- entertainment\n"
|
56 |
-
"- sports
|
57 |
-
"- state"
|
58 |
)
|
59 |
|
60 |
sample_texts = [
|
|
|
18 |
|
19 |
|
20 |
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)"
|
27 |
+
"\n"
|
28 |
+
"- [iNLTK Marathi News Classifier](https://huggingface.co/flax-community/mr-inltk-classifier) fine-tuned on "
|
29 |
+
"[Marathi News Dataset](https://www.kaggle.com/disisbig/marathi-news-dataset)"
|
30 |
)
|
31 |
|
32 |
+
st.markdown("`IndicNLP Marathi News Dataset` consists of 3 classes - `['lifestyle', 'entertainment', 'sports']`")
|
33 |
+
st.markdown("`iNLTK Marathi News Dataset` consists of 3 classes - `['state', 'entertainment', 'sports']`")
|
34 |
+
|
35 |
st.markdown(
|
36 |
+
"Can't figure out where to get a sample text other than the predefined ones? Visit any of the following links, "
|
37 |
+
"copy any headline and see if the model is predicting the respective class 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"
|
|
|
43 |
|
44 |
classifier = st.sidebar.selectbox("Select a Model", index=0, options=["IndicNLP", "iNLTK"])
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
st.sidebar.markdown(
|
47 |
"**IndicNLP Classes**\n"
|
48 |
+
"- lifestyle\n"
|
49 |
"- entertainment\n"
|
50 |
"- sports\n"
|
|
|
51 |
"\n"
|
52 |
"**iNLTK Classes**\n"
|
53 |
+
"- state\n"
|
54 |
"- entertainment\n"
|
55 |
+
"- sports"
|
|
|
56 |
)
|
57 |
|
58 |
sample_texts = [
|
apps/mlm.py
CHANGED
@@ -27,7 +27,7 @@ def app():
|
|
27 |
)
|
28 |
|
29 |
st.markdown(
|
30 |
-
"Can't figure out where to get a sample text? Visit this "
|
31 |
"[link](https://maharashtratimes.com/entertainment/articlelist/19359255.cms), copy any headline and mask a word."
|
32 |
)
|
33 |
|
|
|
27 |
)
|
28 |
|
29 |
st.markdown(
|
30 |
+
"Can't figure out where to get a sample text other than the predefined ones? Visit this "
|
31 |
"[link](https://maharashtratimes.com/entertainment/articlelist/19359255.cms), copy any headline and mask a word."
|
32 |
)
|
33 |
|