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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -64,7 +64,7 @@ if (st.checkbox('الاستعانة بالرسم البياني المعرفي
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
70
 
@@ -75,8 +75,8 @@ if (st.checkbox('الاستعانة بالرسم البياني المعرفي
75
  for e in id_list:
76
  try:
77
  res.extend(list(df.loc[e]['ID2'].values))
78
- except KeyError:
79
- st.write('Token Unfound')
80
  continue
81
  return list(set(res))
82
 
 
64
  try:
65
  res.append(voc.index[voc['word'] == word].values[0])
66
  except (IndexError, KeyError) as e:
67
+ st.write('Token not found')
68
  continue
69
  return res
70
 
 
75
  for e in id_list:
76
  try:
77
  res.extend(list(df.loc[e]['ID2'].values))
78
+ except (KeyError, AttributeError) as f:
79
+ st.write('Token not found')
80
  continue
81
  return list(set(res))
82