awacke1 commited on
Commit
b0f8dd2
1 Parent(s): a476ed5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -61,11 +61,12 @@ top_20_terms = ['Heart', 'Lung', 'Pain', 'Memory', 'Kidney', 'Diabetes', 'Cancer
61
  with st.expander("Search by Common Terms 📚"):
62
  cols = st.columns(4)
63
  for term in top_20_terms:
64
- with cols[top_20_terms.index(term) % 3]:
65
  if st.button(f"{term}"):
66
  filtered_data = filter_by_keyword(data, term)
67
- st.write(f"Filtered Dataset by '{term}' 📊")
68
- st.dataframe(filtered_data)
 
69
  if not filtered_data.empty:
70
  html_blocks = []
71
  for idx, row in filtered_data.iterrows():
 
61
  with st.expander("Search by Common Terms 📚"):
62
  cols = st.columns(4)
63
  for term in top_20_terms:
64
+ with cols[top_20_terms.index(term) % 5]:
65
  if st.button(f"{term}"):
66
  filtered_data = filter_by_keyword(data, term)
67
+ st.write(f"Filter on '{term}' 📊")
68
+ with st.sidebar:
69
+ st.dataframe(filtered_data)
70
  if not filtered_data.empty:
71
  html_blocks = []
72
  for idx, row in filtered_data.iterrows():