faizhalas commited on
Commit
4cf7a5b
Β·
verified Β·
1 Parent(s): 162ad10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -66,22 +66,22 @@ if uploaded_file is not None:
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:
@@ -92,7 +92,7 @@ if uploaded_file is not None:
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."
 
66
  keycheck = get_data(extype)
67
 
68
  if not keycheck:
69
+ rslt_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
+ rslt_keycheck = 'βœ… Keywords Stem'
72
 
73
  #===check any obj===
74
  coldf = sorted(data.select_dtypes(include=['object']).columns.tolist())
75
 
76
  if not coldf:
77
+ rslt_obj = "Unfortunately, you don't have a column containing object in your data. Please check again."
78
  else:
79
+ rslt_obj = 'βœ… Topic Modeling'
80
 
81
  if not keycheck:
82
+ rslt_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
+ rslt_keycheck2 = 'βœ… Bidirected Network'
85
 
86
  #===Visualization===
87
  if 'Publication Year' in data.columns:
 
92
  miss_col = [column for column in col2check if column not in data.columns]
93
 
94
  if not miss_col:
95
+ rslt_viz = 'βœ… Vizualisation'
96
  else:
97
  miss_col_str = ', '.join(miss_col)
98
+ rslt_viz = f"Unfortunately, you don't have: {miss_col_str}. Please check again."