Wordcloud

Hey,
How can I create Wordcloud in Streamlit?

Hi @theamitbhardwaj Welcome to the community,

Creating wordclouds is not something that streamlit supports out of the box but you can create wordclouds convert them to an array and use st.image to show it,

You can use this library for generating word clouds https://github.com/amueller/word_cloud

import streamlit as st
from wordcloud import WordCloud

wc = WordCloud().fit_words({"A": 2, "B": 2, "C": 3})

st.image(wc.to_array())

image
Hope it helps!

1 Like

Hey, Thanks Yes it’s solved my purpose.