wzkariampuzha commited on
Commit
2e91257
1 Parent(s): 9f1994a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -114,20 +114,23 @@ loaded.empty()
114
  st.markdown("Examples of rare diseases include [**Fellman syndrome**](https://rarediseases.info.nih.gov/diseases/1/gracile-syndrome), [**Classic Homocystinuria**](https://rarediseases.info.nih.gov/diseases/6667/classic-homocystinuria), [**7383**](https://rarediseases.info.nih.gov/diseases/7383/phenylketonuria), and [**GARD:0009941**](https://rarediseases.info.nih.gov/diseases/9941/fshmd1a). A full list of rare diseases tracked by the NIH Genetic and Rare Diseases Information Center (GARD) can be found [here](https://rarediseases.info.nih.gov/diseases/browse-by-first-letter).")
115
 
116
  if disease_or_gard_id:
117
- df, sankey_data = extract_abs.streamlit_extraction(disease_or_gard_id, max_results, filtering,
118
  NER_pipeline, entity_classes,
119
  extract_diseases,GARD_dict, max_length,
120
  classify_model_vars)
121
  df.replace(to_replace='None', value="None")
122
  st.dataframe(df, height=200)
123
  csv = convert_df(df)
 
124
  st.download_button(
125
- label="Download epidemiology results for "+disease_or_gard_id+" as CSV",
126
  data = csv,
127
- file_name=disease_or_gard_id+'.csv',
128
  mime='text/csv',
129
  )
130
 
 
 
131
  fig = epi_sankey(sankey_data,disease_or_gard_id)
132
  st.plotly_chart(fig, use_container_width=True)
133
 
 
114
  st.markdown("Examples of rare diseases include [**Fellman syndrome**](https://rarediseases.info.nih.gov/diseases/1/gracile-syndrome), [**Classic Homocystinuria**](https://rarediseases.info.nih.gov/diseases/6667/classic-homocystinuria), [**7383**](https://rarediseases.info.nih.gov/diseases/7383/phenylketonuria), and [**GARD:0009941**](https://rarediseases.info.nih.gov/diseases/9941/fshmd1a). A full list of rare diseases tracked by the NIH Genetic and Rare Diseases Information Center (GARD) can be found [here](https://rarediseases.info.nih.gov/diseases/browse-by-first-letter).")
115
 
116
  if disease_or_gard_id:
117
+ df, sankey_data, name_gardID = extract_abs.streamlit_extraction(disease_or_gard_id, max_results, filtering,
118
  NER_pipeline, entity_classes,
119
  extract_diseases,GARD_dict, max_length,
120
  classify_model_vars)
121
  df.replace(to_replace='None', value="None")
122
  st.dataframe(df, height=200)
123
  csv = convert_df(df)
124
+ disease, gardID = name_gardID
125
  st.download_button(
126
+ label="Download epidemiology results for "+disease+" as CSV",
127
  data = csv,
128
+ file_name=disease+'.csv',
129
  mime='text/csv',
130
  )
131
 
132
+ st.markdown('Search for ['+disease+'](https://rarediseases.info.nih.gov/diseases/'+str(re.sub('GARD:|0','',gardID))+'/'+str('-'.join(disease.split())))
133
+
134
  fig = epi_sankey(sankey_data,disease_or_gard_id)
135
  st.plotly_chart(fig, use_container_width=True)
136