stephenleo commited on
Commit
d10a664
β€’
1 Parent(s): 37d2b76

updating markdowns again

Browse files
Files changed (1) hide show
  1. app.py +13 -7
app.py CHANGED
@@ -23,7 +23,8 @@ def load_data():
23
  """
24
 
25
  st.header('πŸ“‚ Load Data')
26
- st.markdown(read_md('markdown/load_data.md'))
 
27
 
28
  uploaded_file = st.file_uploader("Choose a CSV file",
29
  help='Upload a CSV file with the following columns: Title, Abstract')
@@ -73,7 +74,8 @@ def topic_modeling(data):
73
  """
74
 
75
  st.header('πŸ”₯ Topic Modeling')
76
- st.markdown(read_md('markdown/topic_modeling.md'))
 
77
 
78
  cols = st.columns(3)
79
  with cols[0]:
@@ -122,7 +124,8 @@ def strip_network(data, topic_data, topics):
122
  """
123
 
124
  st.header('πŸš€ STriP Network')
125
- st.markdown(read_md('markdown/stripnet.md'))
 
126
 
127
  with st.spinner('Cosine Similarity Calculation'):
128
  cosine_sim_matrix = helpers.cosine_sim(data)
@@ -180,7 +183,8 @@ def network_centrality(nx_net, topic_data):
180
  """
181
 
182
  st.header('πŸ… Most Important Papers')
183
- st.markdown(read_md('markdown/centrality.md'))
 
184
 
185
  centrality_mapping = {
186
  'Betweenness Centrality': nx.betweenness_centrality,
@@ -206,7 +210,7 @@ def network_centrality(nx_net, topic_data):
206
 
207
 
208
  def read_md(file_path):
209
- """Reads a markdown file and returns the contents as a streamlit markdown component.
210
  """
211
  with open(file_path, 'r') as f:
212
  content = f.read()
@@ -216,7 +220,8 @@ def read_md(file_path):
216
 
217
  def main():
218
  st.title('STriPNet: Semantic Similarity of Scientific Papers!')
219
- st.markdown(read_md('markdown/about_stripnet.md'))
 
220
 
221
  logger.info('========== Step1: Loading data ==========')
222
  data, selected_cols = load_data()
@@ -231,7 +236,8 @@ def main():
231
  logger.info('========== Step4: Network Centrality ==========')
232
  network_centrality(nx_net, topic_data)
233
 
234
- st.markdown(read_md('markdown/about_me.md'))
 
235
 
236
 
237
  if __name__ == '__main__':
 
23
  """
24
 
25
  st.header('πŸ“‚ Load Data')
26
+ about_load_data = read_md('markdown/load_data.md')
27
+ st.markdown(about_load_data)
28
 
29
  uploaded_file = st.file_uploader("Choose a CSV file",
30
  help='Upload a CSV file with the following columns: Title, Abstract')
 
74
  """
75
 
76
  st.header('πŸ”₯ Topic Modeling')
77
+ about_topic_modeling = read_md('markdown/topic_modeling.md')
78
+ st.markdown(about_topic_modeling)
79
 
80
  cols = st.columns(3)
81
  with cols[0]:
 
124
  """
125
 
126
  st.header('πŸš€ STriP Network')
127
+ about_stripnet = read_md('markdown/stripnet.md')
128
+ st.markdown(about_stripnet)
129
 
130
  with st.spinner('Cosine Similarity Calculation'):
131
  cosine_sim_matrix = helpers.cosine_sim(data)
 
183
  """
184
 
185
  st.header('πŸ… Most Important Papers')
186
+ about_centrality = read_md('markdown/centrality.md')
187
+ st.markdown(about_centrality)
188
 
189
  centrality_mapping = {
190
  'Betweenness Centrality': nx.betweenness_centrality,
 
210
 
211
 
212
  def read_md(file_path):
213
+ """Reads a markdown file and returns the contents.
214
  """
215
  with open(file_path, 'r') as f:
216
  content = f.read()
 
220
 
221
  def main():
222
  st.title('STriPNet: Semantic Similarity of Scientific Papers!')
223
+ about_stripnet = read_md('markdown/about_stripnet.md')
224
+ st.markdown(about_stripnet)
225
 
226
  logger.info('========== Step1: Loading data ==========')
227
  data, selected_cols = load_data()
 
236
  logger.info('========== Step4: Network Centrality ==========')
237
  network_centrality(nx_net, topic_data)
238
 
239
+ about_me = read_md('markdown/about_me.md')
240
+ st.markdown(about_me)
241
 
242
 
243
  if __name__ == '__main__':