From 4678464e4a5d6d3930178456642b1ccf2f8d4a97 Mon Sep 17 00:00:00 2001 From: prgofbca7 <374671795@qq.com> Date: Sun, 27 Mar 2022 20:55:38 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E6=BA=90=E7=A0=81.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 源码.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/源码.py b/源码.py index 688a7c2..90520c7 100644 --- a/源码.py +++ b/源码.py @@ -87,7 +87,7 @@ def Gnerate_wordcloud(path)->None: 通过wordcloud库以及jieba将对应的文本文件生成词云 并且能够将所生成词云弹出 ''' - mas = np.array(Image.open("D:\\pytest\\xt\\qs.png"))#读取背景图的信息 + #mas = np.array(Image.open("D:\\pytest\\xt\\qs.png"))#读取背景图的信息 fp= open(path, 'r', encoding='utf-8')#获取文件指针 s=fp.read()#读取文件信息 fp.close() @@ -96,7 +96,7 @@ def Gnerate_wordcloud(path)->None: w=wordcloud.WordCloud(font_path="msyhbd.ttc", width=2000, height=1700, - mask=mas, + #mask=mas, background_color="white" )#初始化 w.generate(tx)#生成词云