Spaces:
Running
Running
UnarineLeo
commited on
Commit
•
a0b3314
1
Parent(s):
b205935
Update app.py
Browse files
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-nso-120m'
|
5 |
|
6 |
def fill_mask(sentences):
|
7 |
results = {}
|
@@ -13,8 +13,8 @@ def fill_mask(sentences):
|
|
13 |
def replace_mask(sentence, predicted_word):
|
14 |
return sentence.replace("<mask>", predicted_word)
|
15 |
|
16 |
-
st.title("Fill Mask | Zabantu-nso-120m
|
17 |
-
st.write("This app predicts the missing word in a sentence using a Zabantu-nso-120m
|
18 |
|
19 |
sample_sentences = ["mopresidente wa <mask> wa afrika-borwa",
|
20 |
"bašomedi ba polase ya dinamune ya zebediela citrus ba hlomile magato a <mask> malebana le go se sepetšwe botse ga dilo ka polaseng eo."
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
unmasker = pipeline('fill-mask', model='dsfsi/zabantu-nso-120m')
|
5 |
|
6 |
def fill_mask(sentences):
|
7 |
results = {}
|
|
|
13 |
def replace_mask(sentence, predicted_word):
|
14 |
return sentence.replace("<mask>", predicted_word)
|
15 |
|
16 |
+
st.title("Fill Mask | Zabantu-nso-120m")
|
17 |
+
st.write("This app predicts the missing word in a sentence using a Zabantu-nso-120m model.")
|
18 |
|
19 |
sample_sentences = ["mopresidente wa <mask> wa afrika-borwa",
|
20 |
"bašomedi ba polase ya dinamune ya zebediela citrus ba hlomile magato a <mask> malebana le go se sepetšwe botse ga dilo ka polaseng eo."
|