企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` import jieba import wordcloud w = wordcloud.WordCloud(width=600,height=400,background_color='black',font_path='msyhbd.ttc') file = open('c:\\521\\m175315.txt',encoding="utf-8") txt = file.read() lst = jieba.lcut(txt) #print(type(lst)) lst1 = ''.join(lst) #print(len(lst1)) w.generate(lst1) w.to_file("py.png") ```