Spaces:
Runtime error
Runtime error
- app.py +6 -6
- style.css +1 -2
- visualize_pipeline.py +12 -1
app.py
CHANGED
@@ -11,21 +11,21 @@ st.title("Welcome to Healthsea 🪐")
|
|
11 |
intro, jellyfish = st.columns(2)
|
12 |
jellyfish.markdown("\n")
|
13 |
|
14 |
-
|
15 |
|
16 |
jellyfish.image("data/img/Jellymation.gif")
|
17 |
intro.markdown(
|
18 |
"Healthsea is a spaCy v3 pipeline that analyzes user reviews to supplement products by extracting their effects on health."
|
19 |
)
|
20 |
intro.markdown(
|
21 |
-
"""With this app, you're able to explore the results of
|
22 |
-
You can search for any health aspect, whether it
|
23 |
-
the app returns a list of the best products and substances. You can also explore the
|
24 |
-
|
25 |
"""
|
26 |
)
|
27 |
intro.markdown(
|
28 |
-
"""
|
29 |
"""
|
30 |
)
|
31 |
|
|
|
11 |
intro, jellyfish = st.columns(2)
|
12 |
jellyfish.markdown("\n")
|
13 |
|
14 |
+
intro.subheader("Create easier access to health✨")
|
15 |
|
16 |
jellyfish.image("data/img/Jellymation.gif")
|
17 |
intro.markdown(
|
18 |
"Healthsea is a spaCy v3 pipeline that analyzes user reviews to supplement products by extracting their effects on health."
|
19 |
)
|
20 |
intro.markdown(
|
21 |
+
"""With this app, you're able to explore the results of Healthsea on up to 1 million reviews.
|
22 |
+
You can search for any health aspect, whether it's an disease (e.g. joint pain) or a desired health effect such as (e.g. energy),
|
23 |
+
the app returns a list of the best products and substances. You can also explore the pipeline itself, by writing custom reviews and
|
24 |
+
get an insight into the individual proccessing steps.
|
25 |
"""
|
26 |
)
|
27 |
intro.markdown(
|
28 |
+
"""You can read more in our [blog post]().
|
29 |
"""
|
30 |
)
|
31 |
|
style.css
CHANGED
@@ -3,8 +3,7 @@
|
|
3 |
border-style: solid;
|
4 |
border-width: 1px;
|
5 |
border-radius: 5px;
|
6 |
-
border-color:
|
7 |
-
box-shadow: 0px 5px #3b3b4d;
|
8 |
}
|
9 |
|
10 |
.kpi:hover {
|
|
|
3 |
border-style: solid;
|
4 |
border-width: 1px;
|
5 |
border-radius: 5px;
|
6 |
+
border-color: inherit;
|
|
|
7 |
}
|
8 |
|
9 |
.kpi:hover {
|
visualize_pipeline.py
CHANGED
@@ -60,8 +60,19 @@ def visualize_pipeline():
|
|
60 |
</div>"""
|
61 |
return html
|
62 |
|
|
|
63 |
# Load model
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
# Pipeline
|
67 |
st.markdown("""---""")
|
|
|
60 |
</div>"""
|
61 |
return html
|
62 |
|
63 |
+
load_state = st.markdown ("#### Loading...")
|
64 |
# Load model
|
65 |
+
try:
|
66 |
+
load_state.markdown ("#### Loading model...")
|
67 |
+
nlp = spacy.load("en_healthsea")
|
68 |
+
|
69 |
+
# Download model
|
70 |
+
except LookupError:
|
71 |
+
import nltk
|
72 |
+
import benepar
|
73 |
+
load_state.markdown ("#### Downloading model...")
|
74 |
+
benepar.download('benepar_en3')
|
75 |
+
load_state.markdown ("#### Loading done!")
|
76 |
|
77 |
# Pipeline
|
78 |
st.markdown("""---""")
|