Pippoz commited on
Commit
e76468d
1 Parent(s): 4f14a8f

adjusting mask

Browse files
Files changed (1) hide show
  1. pages/fill_mask.py +2 -3
pages/fill_mask.py CHANGED
@@ -50,12 +50,11 @@ 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...')
57
- # answer = unmasker(prompt)
58
- answer = [{'sequence': "[CLS] hello i'm a fashion model. [SEP]", 'score': 0.1073106899857521, 'token': 4827, 'token_str': 'fashion'}, {'sequence': "[CLS] hello i'm a role model. [SEP]", 'score': 0.08774490654468536, 'token': 2535, 'token_str': 'role'}, {'sequence': "[CLS] hello i'm a new model. [SEP]", 'score': 0.05338378623127937, 'token': 2047, 'token_str': 'new'}, {'sequence': "[CLS] hello i'm a super model. [SEP]", 'score': 0.04667217284440994, 'token': 3565, 'token_str': 'super'}, {'sequence': "[CLS] hello i'm a fine model. [SEP]", 'score': 0.027095865458250046, 'token': 2986, 'token_str': 'fine'}]
59
  gen.empty()
60
 
61
  with col1:
 
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...')
57
+ answer = unmasker(prompt)
 
58
  gen.empty()
59
 
60
  with col1: