Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,14 +56,14 @@ if uploaded_file is not None:
|
|
| 56 |
elif extype.endswith('.txt'):
|
| 57 |
data = conv_txt(extype)
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
st.write(f"The column '{column}' does not exist in the DataFrame.")
|
| 68 |
-
|
| 69 |
-
st.write(data)
|
|
|
|
| 56 |
elif extype.endswith('.txt'):
|
| 57 |
data = conv_txt(extype)
|
| 58 |
|
| 59 |
+
#===check keywords===
|
| 60 |
+
@st.cache_data(ttl=3600)
|
| 61 |
+
def get_data(extype):
|
| 62 |
+
list_of_column_key = list(keywords.columns)
|
| 63 |
+
list_of_column_key = [k for k in list_of_column_key if 'Keyword' in k]
|
| 64 |
+
return list_of_column_key
|
| 65 |
|
| 66 |
+
if not list_of_column_key:
|
| 67 |
+
st.error('Unfortunately, you don't have a column containing keywords in your data. Please check again. If you want to use it in another column, please rename it to "Keywords".')
|
| 68 |
+
else:
|
| 69 |
+
st.write('✅')
|
|
|
|
|
|
|
|
|