Spaces:
Sleeping
Sleeping
Commit
·
32dc508
1
Parent(s):
b0888a0
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from gensim.models import KeyedVectors
|
3 |
|
4 |
def isNoneWords(word):
|
5 |
-
if word is None or len(word)==0 or word not in model.
|
6 |
return True
|
7 |
else:
|
8 |
return False
|
|
|
2 |
from gensim.models import KeyedVectors
|
3 |
|
4 |
def isNoneWords(word):
|
5 |
+
if word is None or len(word)==0 or word not in model.key_to_index:
|
6 |
return True
|
7 |
else:
|
8 |
return False
|