Spaces:
Runtime error
Runtime error
Change title
Browse files- apps/mlm.py +9 -9
apps/mlm.py
CHANGED
@@ -26,7 +26,7 @@ def load_model(masked_text, model_name):
|
|
26 |
|
27 |
|
28 |
def app():
|
29 |
-
st.
|
30 |
st.markdown("This demo uses multiple hindi transformer models for Masked Language Modelling (MLM).")
|
31 |
|
32 |
models_list = list(cfg["models"].keys())
|
@@ -44,14 +44,6 @@ def app():
|
|
44 |
|
45 |
results_df = pd.DataFrame(columns=["Model Name", "Filled Token", "Filled Text"])
|
46 |
|
47 |
-
st.sidebar.markdown(
|
48 |
-
"### Models\n"
|
49 |
-
"- [RoBERTa Hindi](https://huggingface.co/flax-community/roberta-hindi)\n"
|
50 |
-
"- [Indic Transformers Hindi](https://huggingface.co/neuralspace-reverie/indic-transformers-hi-bert)\n"
|
51 |
-
"- [HindiBERTa](https://huggingface.co/mrm8488/HindiBERTa)\n"
|
52 |
-
"- [RoBERTa Hindi Guj San](https://huggingface.co/surajp/RoBERTa-hindi-guj-san)"
|
53 |
-
)
|
54 |
-
|
55 |
model_names = []
|
56 |
filled_masked_texts = []
|
57 |
filled_tokens = []
|
@@ -63,6 +55,14 @@ def app():
|
|
63 |
select_text = st.sidebar.selectbox("Select any of the following text", texts)
|
64 |
masked_text = st.text_area("Please type a masked sentence to fill", select_text)
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
# pd.set_option('max_colwidth',30)
|
67 |
if st.button("Fill the Mask!"):
|
68 |
with st.spinner("Filling the Mask..."):
|
|
|
26 |
|
27 |
|
28 |
def app():
|
29 |
+
st.title("RoBERTa Hindi")
|
30 |
st.markdown("This demo uses multiple hindi transformer models for Masked Language Modelling (MLM).")
|
31 |
|
32 |
models_list = list(cfg["models"].keys())
|
|
|
44 |
|
45 |
results_df = pd.DataFrame(columns=["Model Name", "Filled Token", "Filled Text"])
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
model_names = []
|
48 |
filled_masked_texts = []
|
49 |
filled_tokens = []
|
|
|
55 |
select_text = st.sidebar.selectbox("Select any of the following text", texts)
|
56 |
masked_text = st.text_area("Please type a masked sentence to fill", select_text)
|
57 |
|
58 |
+
st.sidebar.markdown(
|
59 |
+
"### Models\n"
|
60 |
+
"- [RoBERTa Hindi](https://huggingface.co/flax-community/roberta-hindi)\n"
|
61 |
+
"- [Indic Transformers Hindi](https://huggingface.co/neuralspace-reverie/indic-transformers-hi-bert)\n"
|
62 |
+
"- [HindiBERTa](https://huggingface.co/mrm8488/HindiBERTa)\n"
|
63 |
+
"- [RoBERTa Hindi Guj San](https://huggingface.co/surajp/RoBERTa-hindi-guj-san)"
|
64 |
+
)
|
65 |
+
|
66 |
# pd.set_option('max_colwidth',30)
|
67 |
if st.button("Fill the Mask!"):
|
68 |
with st.spinner("Filling the Mask..."):
|