Update app.py
Browse files
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
|
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
|
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 |
|