Spaces:
Sleeping
Sleeping
wzkariampuzha
commited on
Commit
•
490c9b8
1
Parent(s):
d2c6d3e
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import nltk
|
2 |
-
nltk.data.path.append("/home/user/app/nltk_data/")
|
3 |
-
nltk.data.path.append("/home/user/app/nltk_data")
|
4 |
-
nltk.data.path.append("home/user/app/nltk_data")
|
5 |
nltk.data.path.append("home/user/app/nltk_data/")
|
6 |
#nltk.download('stopwords')
|
7 |
#nltk.download('punkt')
|
@@ -97,6 +97,7 @@ def epi_sankey(sankey_data, disease_or_gard_id):
|
|
97 |
value = [relevant, gathered-relevant, epidemiologic, relevant-epidemiologic]
|
98 |
))])
|
99 |
fig.update_layout(
|
|
|
100 |
hovermode = 'x',
|
101 |
title="Search for the Epidemiology of "+disease_or_gard_id,
|
102 |
font=dict(size = 10, color = 'black'),
|
@@ -121,6 +122,7 @@ if disease_or_gard_id:
|
|
121 |
NER_pipeline, entity_classes,
|
122 |
extract_diseases,GARD_dict, max_length,
|
123 |
classify_model_vars)
|
|
|
124 |
st.dataframe(df, height=200)
|
125 |
csv = convert_df(df)
|
126 |
st.download_button(
|
@@ -129,6 +131,10 @@ if disease_or_gard_id:
|
|
129 |
file_name=disease_or_gard_id+'.csv',
|
130 |
mime='text/csv',
|
131 |
)
|
|
|
|
|
|
|
|
|
132 |
if 'IDS' in list(df.columns):
|
133 |
st.markdown('''COLUMNS: \\
|
134 |
- PROB_OF_EPI: Probability that the paper is an epidemiologic study based on its abstract. \\
|
@@ -145,7 +151,4 @@ if disease_or_gard_id:
|
|
145 |
else:
|
146 |
st.subheader("Categories of Results")
|
147 |
st.markdown(" - **PROB_OF_EPI**: Probability that the paper is an epidemiologic study based on its abstract. \n - **IsEpi**: If it is an epidemiologic study (If PROB_OF_EPI >0.5) \n - **EPI**: Epidemiology Types are the metrics used to estimate disease burden such as 'incidence', 'prevalence rate', or 'occurrence' \n - **STAT**: Epidemiology Rates describe how many people are afflicted by a disease. \n - **DATE**: The dates when the epidemiologic studies were conducted \n - **LOC**: Where the epidemiologic studies were conducted. \n - **SEX**: The biological sexes mentioned in the abstract. Useful for diseases that disproportionately affect one sex over the other or may provide context to composition of the study population \n - **ETHN**: Ethnicities, races, and nationalities of those represented in the epidemiologic study.")
|
148 |
-
#st.dataframe(data=None, width=None, height=None)
|
149 |
-
fig = epi_sankey(sankey_data,disease_or_gard_id)
|
150 |
-
|
151 |
-
st.plotly_chart(fig, use_container_width=True)
|
|
|
1 |
import nltk
|
2 |
+
#nltk.data.path.append("/home/user/app/nltk_data/")
|
3 |
+
#nltk.data.path.append("/home/user/app/nltk_data")
|
4 |
+
#nltk.data.path.append("home/user/app/nltk_data")
|
5 |
nltk.data.path.append("home/user/app/nltk_data/")
|
6 |
#nltk.download('stopwords')
|
7 |
#nltk.download('punkt')
|
|
|
97 |
value = [relevant, gathered-relevant, epidemiologic, relevant-epidemiologic]
|
98 |
))])
|
99 |
fig.update_layout(
|
100 |
+
hoverinfo ='none',
|
101 |
hovermode = 'x',
|
102 |
title="Search for the Epidemiology of "+disease_or_gard_id,
|
103 |
font=dict(size = 10, color = 'black'),
|
|
|
122 |
NER_pipeline, entity_classes,
|
123 |
extract_diseases,GARD_dict, max_length,
|
124 |
classify_model_vars)
|
125 |
+
df.replace(to_replace=None, value="None")
|
126 |
st.dataframe(df, height=200)
|
127 |
csv = convert_df(df)
|
128 |
st.download_button(
|
|
|
131 |
file_name=disease_or_gard_id+'.csv',
|
132 |
mime='text/csv',
|
133 |
)
|
134 |
+
|
135 |
+
fig = epi_sankey(sankey_data,disease_or_gard_id)
|
136 |
+
st.plotly_chart(fig, use_container_width=True)
|
137 |
+
|
138 |
if 'IDS' in list(df.columns):
|
139 |
st.markdown('''COLUMNS: \\
|
140 |
- PROB_OF_EPI: Probability that the paper is an epidemiologic study based on its abstract. \\
|
|
|
151 |
else:
|
152 |
st.subheader("Categories of Results")
|
153 |
st.markdown(" - **PROB_OF_EPI**: Probability that the paper is an epidemiologic study based on its abstract. \n - **IsEpi**: If it is an epidemiologic study (If PROB_OF_EPI >0.5) \n - **EPI**: Epidemiology Types are the metrics used to estimate disease burden such as 'incidence', 'prevalence rate', or 'occurrence' \n - **STAT**: Epidemiology Rates describe how many people are afflicted by a disease. \n - **DATE**: The dates when the epidemiologic studies were conducted \n - **LOC**: Where the epidemiologic studies were conducted. \n - **SEX**: The biological sexes mentioned in the abstract. Useful for diseases that disproportionately affect one sex over the other or may provide context to composition of the study population \n - **ETHN**: Ethnicities, races, and nationalities of those represented in the epidemiologic study.")
|
154 |
+
#st.dataframe(data=None, width=None, height=None)
|
|
|
|
|
|