edithram23 commited on
Commit
b226445
·
verified ·
1 Parent(s): a07614f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -181,7 +181,11 @@ if uploaded_file is not None:
181
  text = pg.get_text()
182
  sentences = sentence_tokenize(text)
183
  for sent in sentences:
 
 
 
184
  entities,words_out = extract_entities(sent)
 
185
  bert_words = words_red_bert(sent)
186
  new=[]
187
  for w in words_out:
 
181
  text = pg.get_text()
182
  sentences = sentence_tokenize(text)
183
  for sent in sentences:
184
+ x = mask_generation(sent)
185
+ t5_words = list(set(sent.split(" ")).difference(set(x.split(" "))))
186
+
187
  entities,words_out = extract_entities(sent)
188
+ words_out+=t5_words
189
  bert_words = words_red_bert(sent)
190
  new=[]
191
  for w in words_out: