Spaces:
Running
Running
wzkariampuzha
commited on
Commit
·
5fe6306
1
Parent(s):
8496c19
Update app.py
Browse files
app.py
CHANGED
@@ -117,12 +117,16 @@ st.markdown("Examples of rare diseases include [**Fellman syndrome**](https://ra
|
|
117 |
if disease_or_gard_id:
|
118 |
df, sankey_data, name_gardID = extract_abs.streamlit_extraction(disease_or_gard_id, max_results, filtering,
|
119 |
NER_pipeline, entity_classes,
|
120 |
-
extract_diseases,GARD_dict, max_length,
|
121 |
classify_model_vars)
|
122 |
df.replace(to_replace='None', value="None")
|
123 |
st.dataframe(df, height=200)
|
124 |
csv = convert_df(df)
|
125 |
disease, gardID = name_gardID
|
|
|
|
|
|
|
|
|
126 |
st.download_button(
|
127 |
label="Download epidemiology results for "+disease+" as CSV",
|
128 |
data = csv,
|
|
|
117 |
if disease_or_gard_id:
|
118 |
df, sankey_data, name_gardID = extract_abs.streamlit_extraction(disease_or_gard_id, max_results, filtering,
|
119 |
NER_pipeline, entity_classes,
|
120 |
+
extract_diseases, GARD_dict, max_length,
|
121 |
classify_model_vars)
|
122 |
df.replace(to_replace='None', value="None")
|
123 |
st.dataframe(df, height=200)
|
124 |
csv = convert_df(df)
|
125 |
disease, gardID = name_gardID
|
126 |
+
#if the user input does not have a number in it (i.e. weak proxy for if it is a GARD ID), then preserve the user input as the disease term.
|
127 |
+
if not bool(re.search(r'\d', disease_or_gard_id)):
|
128 |
+
disease = disease_or_gard_id
|
129 |
+
|
130 |
st.download_button(
|
131 |
label="Download epidemiology results for "+disease+" as CSV",
|
132 |
data = csv,
|