UnarineLeo commited on
Commit
e255bad
1 Parent(s): 5e69693

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
- unmasker = pipeline('fill-mask', model='dsfsi/zabantu-bantu-250m')
5
 
6
  sample_sentences = {
7
  'Zulu': "Le ndoda ithi izo____ ukudla.",
@@ -24,11 +24,12 @@ def fill_mask_for_languages(sentences):
24
  def replace_mask(sentence, predicted_word):
25
  return sentence.replace("____", predicted_word)
26
 
27
- st.title("Fill Mask for Multiple Languages | Zabantu-Bantu-250m")
28
  st.write("This app predicts the missing word for sentences in Zulu, Tshivenda, Sepedi, Tswana, and Tsonga using a Zabantu BERT model.")
29
 
30
  user_sentence = st.text_input("Enter your own sentence with a masked word (use '____'):", "\n".join(
31
- f"'{lang}': '{sentence}',\n"
 
32
  for lang, sentence in sample_sentences.items()
33
  ))
34
 
 
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
+ unmasker = pipeline('fill-mask', model='dsfsi/zabantu-xlm-roberta')
5
 
6
  sample_sentences = {
7
  'Zulu': "Le ndoda ithi izo____ ukudla.",
 
24
  def replace_mask(sentence, predicted_word):
25
  return sentence.replace("____", predicted_word)
26
 
27
+ st.title("Fill Mask for Multiple Languages | Zabantu-XLM-Roberta")
28
  st.write("This app predicts the missing word for sentences in Zulu, Tshivenda, Sepedi, Tswana, and Tsonga using a Zabantu BERT model.")
29
 
30
  user_sentence = st.text_input("Enter your own sentence with a masked word (use '____'):", "\n".join(
31
+ f"'{lang}': '{sentence}',"
32
+ f"\n"
33
  for lang, sentence in sample_sentences.items()
34
  ))
35