Spaces:
Build error
Build error
Sam Passaglia
commited on
Commit
•
e640827
1
Parent(s):
8061dc1
minor
Browse files
app.py
CHANGED
@@ -175,25 +175,25 @@ else:
|
|
175 |
# unsafe_allow_html=True,
|
176 |
# )
|
177 |
|
178 |
-
#
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
|
183 |
-
#
|
184 |
-
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
|
190 |
-
|
191 |
|
192 |
-
#
|
193 |
-
|
194 |
-
|
195 |
-
#
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
|
|
175 |
# unsafe_allow_html=True,
|
176 |
# )
|
177 |
|
178 |
+
# Randomize button
|
179 |
+
if st.button("🎲 Randomize the input sentence"):
|
180 |
+
st.session_state.default_sentence = get_random_sentence()
|
181 |
+
st.experimental_rerun()
|
182 |
|
183 |
+
# Stats section
|
184 |
+
global_accuracy, stats_df = get_stats()
|
185 |
|
186 |
+
st.subheader(
|
187 |
+
f"{len(stats_df)} heteronyms supported, with a global accuracy of {global_accuracy:.0%}"
|
188 |
+
)
|
189 |
|
190 |
+
st.dataframe(stats_df)
|
191 |
|
192 |
+
# Hide the footer
|
193 |
+
hide_streamlit_style = """
|
194 |
+
<style>
|
195 |
+
#MainMenu {visibility: hidden;}
|
196 |
+
footer {visibility: hidden;}
|
197 |
+
</style>
|
198 |
+
"""
|
199 |
+
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|