Spaces:
Runtime error
Runtime error
Added classification model classes
Browse files- app.py +1 -1
- apps/classifier.py +18 -5
- config.json +1 -1
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from multiapp import MultiApp
|
|
| 5 |
|
| 6 |
|
| 7 |
def main():
|
| 8 |
-
img = st.sidebar.image("images/huggingface-marathi-roberta.png", width=
|
| 9 |
app = MultiApp()
|
| 10 |
app.add_app("Fill Mask", mlm.app)
|
| 11 |
app.add_app("Text Classification", classifier.app)
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
def main():
|
| 8 |
+
img = st.sidebar.image("images/huggingface-marathi-roberta.png", width=230)
|
| 9 |
app = MultiApp()
|
| 10 |
app.add_app("Fill Mask", mlm.app)
|
| 11 |
app.add_app("Text Classification", classifier.app)
|
apps/classifier.py
CHANGED
|
@@ -30,19 +30,32 @@ def app():
|
|
| 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)"
|
| 34 |
-
|
| 35 |
)
|
| 36 |
|
| 37 |
-
classifier = st.sidebar.selectbox("Select a Model", index=0, options=["
|
| 38 |
|
| 39 |
st.sidebar.markdown(
|
| 40 |
-
"- [
|
| 41 |
"[Indic NLP Corpus for Marathi](https://github.com/ai4bharat/indicnlp_corpus#indicnlp-news-article-classification-dataset)"
|
| 42 |
"\n"
|
| 43 |
-
"- [iNLTK](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 |
|
| 47 |
sample_texts = [
|
| 48 |
"अध्यक्ष शरद पवार आणि उपमुख्यमंत्री अजित पवार यांची भेट घेतली.",
|
|
|
|
| 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"
|
| 34 |
+
"- [state](https://maharashtratimes.com/maharashtra/articlelist/2429066.cms)"
|
| 35 |
)
|
| 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\n"
|
| 57 |
+
"- state"
|
| 58 |
+
)
|
| 59 |
|
| 60 |
sample_texts = [
|
| 61 |
"अध्यक्ष शरद पवार आणि उपमुख्यमंत्री अजित पवार यांची भेट घेतली.",
|
config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"models": {
|
| 3 |
-
"
|
| 4 |
"iNLTK": "flax-community/mr-inltk-classifier",
|
| 5 |
"RoBERTa": "flax-community/roberta-base-mr"
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"models": {
|
| 3 |
+
"IndicNLP": "flax-community/mr-indicnlp-classifier",
|
| 4 |
"iNLTK": "flax-community/mr-inltk-classifier",
|
| 5 |
"RoBERTa": "flax-community/roberta-base-mr"
|
| 6 |
}
|