Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,7 @@ if (st.checkbox('الاستعانة بالرسم البياني المعرفي
|
|
63 |
for word in query.split():
|
64 |
try:
|
65 |
res.append(voc.index[voc['word'] == word].values[0])
|
66 |
-
except KeyError:
|
67 |
st.write('Token Unfound')
|
68 |
continue
|
69 |
return res
|
|
|
63 |
for word in query.split():
|
64 |
try:
|
65 |
res.append(voc.index[voc['word'] == word].values[0])
|
66 |
+
except (IndexError, KeyError) as e:
|
67 |
st.write('Token Unfound')
|
68 |
continue
|
69 |
return res
|