import wordcloud
import matplotlib.pyplot as plt
from imageio import imread
print([1,2]+[3,4])
# 创建一个词云对象
wc = wordcloud.WordCloud()
img = imread(r'F:PyCharmtestbg.jpg')
# 要生成词云的文本
text = '''
Why can pre-trained language models (PLMs) 001
learn universal representations and effectively 002
adapt to broad NLP tasks differing a lot super- 003
ficially? In this work, we empirically find evi- 004
dence indicating that the adaptations of PLMs 005
to various few-shot tasks can be reparameter- 006
ized as opt服务器托管网imizing only a few free parame- 007
ters in a unified low-dimensional intrinsic task 008
subspace, which may help us understand why 009
PLMs could easily adapt to various NLP tasks 010
with small-scale data. To find such a subspace 011
and examine its universality, we propose an 012
analysis pipeline called intrinsic prompt tun- 013
ing (IPT).
'''
wc = wordcloud.WordCloud(
background_color="white", # 背景色
width=800, height=400, # 图片宽高
margin=5, # 词与词之间的间距
mask=img
)
# 生成词云
wc.generate(t服务器托管网ext)
# 显示词云
plt.imshow(wc, interpolation="bilinear")
plt.axis("off") # 隐藏坐标轴
plt.show()
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
python 如何查看一个函数的参数?使用inspect模块! 在Python中,您可以使用inspect模块来查看一个函数的参数信息。inspect模块提供了许多用于检查对象的工具函数,其中包括用于获取函数参数信息的函数。 以下是一个示例,展示了如何使用in…