Framby commited on
Commit
eac340a
·
verified ·
1 Parent(s): 239922e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -87,13 +87,13 @@ with col1:
87
  st.plotly_chart(fig, use_container_width=True)
88
 
89
  with col2:
90
- st.markdown("### Mots les plus fréquents")
91
- all_words = " ".join(X).split()
92
- word_freq = Counter(all_words)
93
- most_common_words = pd.DataFrame(
94
- word_freq.most_common(20), columns=['Mot', 'Nombre'])
95
- fig2 = px.bar(most_common_words, x='Mot', y='Nombre',
96
- title="20 mots les plus fréquents")
97
  st.plotly_chart(fig2, use_container_width=True)
98
 
99
  st.markdown("### Nuage de mots")
 
87
  st.plotly_chart(fig, use_container_width=True)
88
 
89
  with col2:
90
+ st.markdown("### Tags les plus fréquents")
91
+ all_tags = [tag for sublist in Y for tag in sublist]
92
+ tag_freq = Counter(all_tags)
93
+ most_common_tags = pd.DataFrame(
94
+ tag_freq.most_common(20), columns=['Tag', 'Nombre'])
95
+ fig2 = px.bar(most_common_tags, x='Tag', y='Nombre',
96
+ title="20 tags les plus fréquents")
97
  st.plotly_chart(fig2, use_container_width=True)
98
 
99
  st.markdown("### Nuage de mots")