Update app.py
Browse files
app.py
CHANGED
@@ -233,6 +233,10 @@ choices.insert(0,'None')
|
|
233 |
st.sidebar.subheader("Topics")
|
234 |
show_clusters = {i:len(clusters[i]) for i in clusters.keys()}
|
235 |
cdf = pd.DataFrame(data={"Articles":list(show_clusters.values()), "Cluster":list(show_clusters.keys())} )
|
|
|
|
|
|
|
|
|
236 |
st.sidebar.table(cdf)
|
237 |
|
238 |
|
@@ -284,7 +288,7 @@ with st.form(key='columns_in_form'):
|
|
284 |
st.info(digestor.text)
|
285 |
|
286 |
st.subheader("Summarization stats:")
|
287 |
-
|
288 |
st.success(f"""Digest completed in {digestor.timer.timers['digest_time']:.2f} seconds. \nText approximately {len(digestor.text.split(" ") )} words. \nNumber of articles summarized: {outdata['article_count']}""")
|
289 |
|
290 |
# Summarize the findings for all models
|
@@ -293,4 +297,3 @@ with st.form(key='columns_in_form'):
|
|
293 |
st.subheader("Issues: ")
|
294 |
st.write("Repetition:")
|
295 |
|
296 |
-
"st.session_state object:", st.session_state
|
|
|
233 |
st.sidebar.subheader("Topics")
|
234 |
show_clusters = {i:len(clusters[i]) for i in clusters.keys()}
|
235 |
cdf = pd.DataFrame(data={"Articles":list(show_clusters.values()), "Cluster":list(show_clusters.keys())} )
|
236 |
+
styler = df.style.hide_index()
|
237 |
+
st.write(styler.to_html(), unsafe_allow_html=True)
|
238 |
+
|
239 |
+
#st.write(df.to_html(index=False), unsafe_allow_html=True)
|
240 |
st.sidebar.table(cdf)
|
241 |
|
242 |
|
|
|
288 |
st.info(digestor.text)
|
289 |
|
290 |
st.subheader("Summarization stats:")
|
291 |
+
st.metric(label="Length", value=len(digestor.text.split(" ") ))
|
292 |
st.success(f"""Digest completed in {digestor.timer.timers['digest_time']:.2f} seconds. \nText approximately {len(digestor.text.split(" ") )} words. \nNumber of articles summarized: {outdata['article_count']}""")
|
293 |
|
294 |
# Summarize the findings for all models
|
|
|
297 |
st.subheader("Issues: ")
|
298 |
st.write("Repetition:")
|
299 |
|
|