mbahrami commited on
Commit
b3a6a4b
1 Parent(s): 75fe8c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ if text:
25
  result = nlp(text+' '+nlp.tokenizer.mask_token)
26
  data_load_state.text('')
27
  for index, r in enumerate(result):
28
- if r['token_str'].lower().strip() in history_keyword_text.lower().strip():
29
  #found from history, then increase the score of tokens
30
  result[index]['score']*=HISTORY_WEIGHT
31
 
 
25
  result = nlp(text+' '+nlp.tokenizer.mask_token)
26
  data_load_state.text('')
27
  for index, r in enumerate(result):
28
+ if r['token_str'].lower().strip() in history_keyword_text.lower().strip() and len(r['token_str'].lower().strip())>1:
29
  #found from history, then increase the score of tokens
30
  result[index]['score']*=HISTORY_WEIGHT
31