Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,22 +66,22 @@ if uploaded_file is not None:
|
|
| 66 |
keycheck = get_data(extype)
|
| 67 |
|
| 68 |
if not keycheck:
|
| 69 |
-
|
| 70 |
else:
|
| 71 |
-
|
| 72 |
|
| 73 |
#===check any obj===
|
| 74 |
coldf = sorted(data.select_dtypes(include=['object']).columns.tolist())
|
| 75 |
|
| 76 |
if not coldf:
|
| 77 |
-
|
| 78 |
else:
|
| 79 |
-
|
| 80 |
|
| 81 |
if not keycheck:
|
| 82 |
-
|
| 83 |
else:
|
| 84 |
-
|
| 85 |
|
| 86 |
#===Visualization===
|
| 87 |
if 'Publication Year' in data.columns:
|
|
@@ -91,8 +91,8 @@ if uploaded_file is not None:
|
|
| 91 |
col2check = ['Document Type','Source title','Cited by','Year']
|
| 92 |
miss_col = [column for column in col2check if column not in data.columns]
|
| 93 |
|
| 94 |
-
if not
|
| 95 |
-
|
| 96 |
else:
|
| 97 |
miss_col_str = ', '.join(miss_col)
|
| 98 |
-
|
|
|
|
| 66 |
keycheck = get_data(extype)
|
| 67 |
|
| 68 |
if not keycheck:
|
| 69 |
+
er_keycheck = "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'."
|
| 70 |
else:
|
| 71 |
+
suc_keycheck = 'β
Keywords Stem'
|
| 72 |
|
| 73 |
#===check any obj===
|
| 74 |
coldf = sorted(data.select_dtypes(include=['object']).columns.tolist())
|
| 75 |
|
| 76 |
if not coldf:
|
| 77 |
+
er_obj = "Unfortunately, you don't have a column containing object in your data. Please check again."
|
| 78 |
else:
|
| 79 |
+
suc_obj = 'β
Topic Modeling'
|
| 80 |
|
| 81 |
if not keycheck:
|
| 82 |
+
er_keycheck2 = "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'."
|
| 83 |
else:
|
| 84 |
+
suc_keycheck2 = 'β
Bidirected Network'
|
| 85 |
|
| 86 |
#===Visualization===
|
| 87 |
if 'Publication Year' in data.columns:
|
|
|
|
| 91 |
col2check = ['Document Type','Source title','Cited by','Year']
|
| 92 |
miss_col = [column for column in col2check if column not in data.columns]
|
| 93 |
|
| 94 |
+
if not miss_col:
|
| 95 |
+
suc_viz = 'β
Vizualisation'
|
| 96 |
else:
|
| 97 |
miss_col_str = ', '.join(miss_col)
|
| 98 |
+
er_viz = f"Unfortunately, you don't have: {miss_col_str}. Please check again."
|