Commit 63c38b6e by BellCodeEditor

save project

parent 69ba38bc
Showing with 1 additions and 1 deletions
......@@ -6,7 +6,7 @@ img = Image.open("bell.png")
val = np.array(img)
img_colors = wordcloud.ImageColorGenerator(val)
w = wordcloud.WordCloud(background_color="green" , font_path="SimHei.ttf",mask=val ,color_func=ing_colors)
w = wordcloud.WordCloud(background_color="green" , font_path="SimHei.ttf",mask=val ,color_func=img_colors)
with open(file="1.txt",mode="r",encoding="utf-8") as file:
r = file.read()
w.generate(r)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment