Spaces:
Runtime error
Runtime error
Update pages/fill_mask.py
Browse files- pages/fill_mask.py +3 -3
pages/fill_mask.py
CHANGED
|
@@ -12,8 +12,8 @@ def app():
|
|
| 12 |
|
| 13 |
|
| 14 |
@st.cache(allow_output_mutation=True, suppress_st_warning =True, show_spinner=False)
|
| 15 |
-
def get_model():
|
| 16 |
-
return pipeline('fill-mask', model=
|
| 17 |
|
| 18 |
def create_graph(answer):
|
| 19 |
x_bar = [i['token_str'] for i in answer]
|
|
@@ -50,7 +50,7 @@ def app():
|
|
| 50 |
model = 'bert-base-uncased'
|
| 51 |
|
| 52 |
with st.spinner('Loading Model... (This may take a while)'):
|
| 53 |
-
unmasker = get_model()
|
| 54 |
st.success('Model loaded correctly!')
|
| 55 |
|
| 56 |
gen = st.info('Generating text...')
|
|
|
|
| 12 |
|
| 13 |
|
| 14 |
@st.cache(allow_output_mutation=True, suppress_st_warning =True, show_spinner=False)
|
| 15 |
+
def get_model(model):
|
| 16 |
+
return pipeline('fill-mask', model=model)
|
| 17 |
|
| 18 |
def create_graph(answer):
|
| 19 |
x_bar = [i['token_str'] for i in answer]
|
|
|
|
| 50 |
model = 'bert-base-uncased'
|
| 51 |
|
| 52 |
with st.spinner('Loading Model... (This may take a while)'):
|
| 53 |
+
unmasker = get_model(model)
|
| 54 |
st.success('Model loaded correctly!')
|
| 55 |
|
| 56 |
gen = st.info('Generating text...')
|