From the course: Build Three Real-World Python Applications

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

How to improve a word cloud

How to improve a word cloud

- [Instructor] The word cloud we made in the previous video does the trick but we could customize it a bit to make it more visually appealing. In this video, we will adjust the shape and color of the word cloud to improve how it looks. One thing to do before we get started is to make sure you have this man_in_top_hat jpeg inside the same folder as your Jupiter notebook file for this exercise. If you're in code spaces, it should already be in there, and if you click on that, it should be this image right here. We'll exit out of this and close our file explorer to begin getting started with our new word cloud. We will begin by defining our mask variable to use our image of a man in a top hat in our word cloud. To do this, we will create our mask variable, being mask equal it two np.array. And here we want to have our image.open, and we want to open our man_in_top_hat.jpeg. Next, we will create a function to provide a gray…

Contents