#!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
__title__ = 'word_cloud'
__author__ = 'JieYuan'
__mtime__ = '19-3-1'
"""

# from IPython.display import Image
# import numpy as np
# from wordcloud import WordCloud, ImageColorGenerator
# cloud_mask = np.array(Image.open("/home/yuanjie/desktop/xiaomi.jpg"))
#
# #生成wordcloud对象
# wc = WordCloud(background_color="white",
#     mask=cloud_mask,
#     max_words=200,
#     font_path="/home/yuanjie/desktop/simhei/simhei.ttf",
#     min_font_size=15,
#     max_font_size=50,
#     width=400)
#
# wc.generate_from_frequencies(tf)
# wc.to_file("pic.png")
# Image.open('./pic.png')
