Wordcloud

PHOTO EMBED

Fri Jan 19 2024 03:40:48 GMT+0000 (Coordinated Universal Time)

Saved by @signup

from wordcloud import WordCloud
import matplotlib.pyplot as plt
text = ["hi", "hello", "hello, im tea", "i love tea", "tea is my fav", "Tarsha"]
text = " ".join(text)
wordcloud = WordCloud(width=800, height=400, background_color="white").generate(text)
plt.figure(figsize=(10, 5))
plt.imshow(wordcloud, interpolation="bilinear")
plt.axis("off")
plt.show()
content_copyCOPY