Spaces:
Build error
Build error
Pietro Lesci
commited on
Commit
•
6114f21
1
Parent(s):
04c2b04
fix: remove flickering
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ st.set_page_config(
|
|
16 |
)
|
17 |
|
18 |
# session state
|
19 |
-
session = session_state.get(process=False, run_id=0, posdf=None, negdf=None)
|
20 |
|
21 |
|
22 |
# ==== SIDEBAR ==== #
|
@@ -32,47 +32,34 @@ PAGES = {
|
|
32 |
"About": about,
|
33 |
}
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
page = PAGES[selection]
|
40 |
|
41 |
# FILE UPLOADER
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
|
48 |
|
49 |
# FOOTER
|
50 |
-
with st.sidebar.beta_container():
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
|
60 |
|
61 |
# ==== MAIN ==== #
|
62 |
with st.beta_container():
|
63 |
st.title("Wordify")
|
64 |
-
st.markdown(
|
65 |
-
"""
|
66 |
-
Wordify makes it easy to identify words that discriminate categories in textual data.
|
67 |
-
|
68 |
-
Let's explain Wordify with an example. Imagine you are thinking about having a glass
|
69 |
-
of wine :wine_glass: with your friends :man-man-girl-girl: and you have to buy a bottle.
|
70 |
-
You know you like `bold`, `woody` wine but are unsure which one to choose.
|
71 |
-
You wonder whether there are some words that describe each type of wine.
|
72 |
-
Since you are a researcher :female-scientist: :male-scientist:, you decide to approach
|
73 |
-
the problem scientifically :microscope:. That's where Wordify comes to the rescue!
|
74 |
-
"""
|
75 |
-
)
|
76 |
|
77 |
|
78 |
page.write(session, uploaded_file)
|
|
|
16 |
)
|
17 |
|
18 |
# session state
|
19 |
+
session = session_state.get(process=False, run_id=0, posdf=None, negdf=None, uploaded_file_id=0)
|
20 |
|
21 |
|
22 |
# ==== SIDEBAR ==== #
|
|
|
32 |
"About": about,
|
33 |
}
|
34 |
|
35 |
+
st.sidebar.header("Navigation")
|
36 |
+
# with st.sidebar.beta_container():
|
37 |
+
selection = st.sidebar.radio("Go to", list(PAGES.keys()))
|
|
|
38 |
page = PAGES[selection]
|
39 |
|
40 |
# FILE UPLOADER
|
41 |
+
st.sidebar.markdown("")
|
42 |
+
st.sidebar.markdown("")
|
43 |
+
st.sidebar.header("Upload file")
|
44 |
+
# with st.sidebar.beta_container():
|
45 |
+
uploaded_file = st.sidebar.file_uploader("Select file", type=[i.name for i in SupportedFiles])
|
46 |
|
47 |
|
48 |
# FOOTER
|
49 |
+
# with st.sidebar.beta_container():
|
50 |
+
st.sidebar.markdown("")
|
51 |
+
st.sidebar.markdown("")
|
52 |
+
st.sidebar.markdown(
|
53 |
+
"""
|
54 |
+
<span style="font-size: 0.75em">Built with ♥ by [`Pietro Lesci`](https://pietrolesci.github.io/) and [`MilaNLP`](https://twitter.com/MilaNLProc?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor)</span>
|
55 |
+
""",
|
56 |
+
unsafe_allow_html=True,
|
57 |
+
)
|
58 |
|
59 |
|
60 |
# ==== MAIN ==== #
|
61 |
with st.beta_container():
|
62 |
st.title("Wordify")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
|
65 |
page.write(session, uploaded_file)
|