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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -66,22 +66,22 @@ if uploaded_file is not None:
66
  keycheck = get_data(extype)
67
 
68
  if not keycheck:
69
- 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'.")
70
  else:
71
- st.write('βœ… Keywords Stem')
72
 
73
  #===check any obj===
74
  coldf = sorted(data.select_dtypes(include=['object']).columns.tolist())
75
 
76
  if not coldf:
77
- st.error("Unfortunately, you don't have a column containing object in your data. Please check again.")
78
  else:
79
- st.write('βœ… Topic Modeling')
80
 
81
  if not keycheck:
82
- 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'.")
83
  else:
84
- st.write('βœ… Bidirected Network')
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 missing_columns:
95
- st.write('βœ… Vizualisation')
96
  else:
97
  miss_col_str = ', '.join(miss_col)
98
- st.write(f"Unfortunately, you don't have: {miss_col_str}. Please check again.")
 
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."