Python Prompts Free Prompt

Python Script to Generate Word Clouds from Text

Write a Python script to generate a word cloud from a text file
☆ Save
Prompt
You are a Python developer. Write a script that reads a text file and generates a word cloud image using the wordcloud library. The script must: 1) Accept input text file path, 2) Remove common stop words, 3) Allow customization: max words, colors, shape, 4) Save the word cloud as an image, 5) Provide an option to use a mask image, 6) Generate a frequency distribution chart, 7) Handle large texts efficiently. Add comments and a requirements.txt.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.