Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|