Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +1 -14
src/streamlit_app.py
CHANGED
|
@@ -342,20 +342,7 @@ if st.button("Results"):
|
|
| 342 |
)
|
| 343 |
st.plotly_chart(fig_bar)
|
| 344 |
|
| 345 |
-
|
| 346 |
-
st.subheader("Most Frequent Entities", divider="violet")
|
| 347 |
-
word_counts = df['text'].value_counts().reset_index()
|
| 348 |
-
word_counts.columns = ['Entity', 'Count']
|
| 349 |
-
repeating_entities = word_counts[word_counts['Count'] > 1]
|
| 350 |
-
if not repeating_entities.empty:
|
| 351 |
-
st.dataframe(repeating_entities, use_container_width=True)
|
| 352 |
-
fig_repeating_bar = px.bar(repeating_entities, x='Entity', y='Count', color='Entity')
|
| 353 |
-
fig_repeating_bar.update_layout(xaxis={'categoryorder': 'total descending'},
|
| 354 |
-
paper_bgcolor='#E8F5E9',
|
| 355 |
-
plot_bgcolor='#E8F5E9')
|
| 356 |
-
st.plotly_chart(fig_repeating_bar)
|
| 357 |
-
else:
|
| 358 |
-
st.warning("No entities were found that occur more than once.")
|
| 359 |
|
| 360 |
# Download Section
|
| 361 |
st.divider()
|
|
|
|
| 342 |
)
|
| 343 |
st.plotly_chart(fig_bar)
|
| 344 |
|
| 345 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 346 |
|
| 347 |
# Download Section
|
| 348 |
st.divider()
|