Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,21 +66,34 @@ if __name__ == '__main__':
|
|
| 66 |
if st._is_running_with_streamlit:
|
| 67 |
st.markdown("""
|
| 68 |
# Auto-Complete
|
| 69 |
-
This is an example of an auto-complete approach where the next token suggested based on users's history
|
| 70 |
-
|
|
|
|
|
|
|
| 71 |
|
| 72 |
## Source
|
| 73 |
Forked from **[mbahrami/Auto-Complete_Semantic](https://huggingface.co/spaces/mbahrami/Auto-Complete_Semantic)** with *[osanseviero/fork_a_repo](https://huggingface.co/spaces/osanseviero/fork_a_repo)*.
|
| 74 |
|
| 75 |
## Disclaimer
|
| 76 |
-
The behind idea is to compare our models that included Guarani during pre-training vs. the models that do not
|
|
|
|
|
|
|
|
|
|
| 77 |
""")
|
| 78 |
history_keyword_text = st.text_input("Enter users's history <Keywords Match> (optional, i.e., 'Premio Cervantes')", value="")
|
| 79 |
|
| 80 |
semantic_text = st.text_input("Enter users's history <Semantic> (optional, i.e., 'hai')", value="hai")
|
| 81 |
|
| 82 |
text = st.text_input("Enter a text for auto completion...", value="Augusto Roa Bastos ha'e kuimba'e arandu")
|
| 83 |
-
model = st.selectbox("Choose a model",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
data_load_state = st.text('1.Loading model ...')
|
| 86 |
|
|
|
|
| 66 |
if st._is_running_with_streamlit:
|
| 67 |
st.markdown("""
|
| 68 |
# Auto-Complete
|
| 69 |
+
This is an example of an auto-complete approach where the next token suggested based on users's history
|
| 70 |
+
Keyword match & Semantic similarity of users's history (log).
|
| 71 |
+
The next token is predicted per probability and a weight if it is appeared in keyword user's history or
|
| 72 |
+
there is a similarity to semantic user's history.
|
| 73 |
|
| 74 |
## Source
|
| 75 |
Forked from **[mbahrami/Auto-Complete_Semantic](https://huggingface.co/spaces/mbahrami/Auto-Complete_Semantic)** with *[osanseviero/fork_a_repo](https://huggingface.co/spaces/osanseviero/fork_a_repo)*.
|
| 76 |
|
| 77 |
## Disclaimer
|
| 78 |
+
The behind idea is to compare our models that included Guarani during pre-training vs. the models that do not
|
| 79 |
+
have saw it. That is, the multilingual ones: XLM-RoBERTa, mBERT and Spanish BERTs (BETO and PLAN-TL-RoBERTa).
|
| 80 |
+
Additionally, we include facebook/xlm-v-base model (it includes Guarani during pre-training),
|
| 81 |
+
for comparison reasons.
|
| 82 |
""")
|
| 83 |
history_keyword_text = st.text_input("Enter users's history <Keywords Match> (optional, i.e., 'Premio Cervantes')", value="")
|
| 84 |
|
| 85 |
semantic_text = st.text_input("Enter users's history <Semantic> (optional, i.e., 'hai')", value="hai")
|
| 86 |
|
| 87 |
text = st.text_input("Enter a text for auto completion...", value="Augusto Roa Bastos ha'e kuimba'e arandu")
|
| 88 |
+
model = st.selectbox("Choose a model",
|
| 89 |
+
["mmaguero/gn-bert-tiny-cased", "mmaguero/gn-bert-small-cased",
|
| 90 |
+
"mmaguero/gn-bert-base-cased", "mmaguero/gn-bert-large-cased",
|
| 91 |
+
"mmaguero/multilingual-bert-gn-base-cased", "mmaguero/beto-gn-base-cased",
|
| 92 |
+
"facebook/xlm-v-base",
|
| 93 |
+
|
| 94 |
+
"bert-base-multilingual-cased", "xlm-roberta-base",
|
| 95 |
+
|
| 96 |
+
"dccuchile/bert-base-spanish-wwm-cased", "PlanTL-GOB-ES/roberta-base-bne"])
|
| 97 |
|
| 98 |
data_load_state = st.text('1.Loading model ...')
|
| 99 |
|