zavavan commited on
Commit
3e91553
·
verified ·
1 Parent(s): 47158d2

Update dashboard.py

Browse files
Files changed (1) hide show
  1. dashboard.py +2 -2
dashboard.py CHANGED
@@ -91,12 +91,12 @@ def create_ent_bar_charts(ents, **kwargs):
91
  sorted_drugs = sorted(topDrugEntities.items(), key=lambda x: x[1], reverse=True)
92
  sorted_conditions = sorted(topConditionEntities.items(), key=lambda x: x[1], reverse=True)
93
 
94
- for i, drg in enumerate(list(sorted_drugs.keys())):
95
  button = pn.widgets.Button(name=drg, width=150)
96
  ## Open the associated URL in a new tab when button is clicked
97
  button.js_on_click(code=f'window.open("https://api-vast.jrc.service.ec.europa.eu/describe/?url=http://causaldrugskg.org/causaldrugskg/resource/{drg}", "_blank");')
98
  drug_buttons.append(button)
99
- for i, cnd in enumerate(list(sorted_conditions.keys())):
100
  button = pn.widgets.Button(name=cnd, width=150)
101
  ## Open the associated URL in a new tab when button is clicked
102
  button.js_on_click(
 
91
  sorted_drugs = sorted(topDrugEntities.items(), key=lambda x: x[1], reverse=True)
92
  sorted_conditions = sorted(topConditionEntities.items(), key=lambda x: x[1], reverse=True)
93
 
94
+ for i, (drg,count) in enumerate(sorted_drugs):
95
  button = pn.widgets.Button(name=drg, width=150)
96
  ## Open the associated URL in a new tab when button is clicked
97
  button.js_on_click(code=f'window.open("https://api-vast.jrc.service.ec.europa.eu/describe/?url=http://causaldrugskg.org/causaldrugskg/resource/{drg}", "_blank");')
98
  drug_buttons.append(button)
99
+ for i, (cnd,count) in enumerate(sorted_conditions):
100
  button = pn.widgets.Button(name=cnd, width=150)
101
  ## Open the associated URL in a new tab when button is clicked
102
  button.js_on_click(