Hamda commited on
Commit
b9b338b
1 Parent(s): c3cfbed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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