THUDM / VisualGLM-6B

Chinese and English multimodal conversational language model | 多模态中英双语对话语言模型
Apache License 2.0
4.08k stars 416 forks source link

在运行web_demo时,报错AttributeError: 'Chatbot' object has no attribute 'style'. #315

Closed hzh0720 closed 11 months ago

hzh0720 commented 11 months ago

你好,我在运行web_demo时,报错AttributeError: 'Chatbot' object has no attribute 'style'.Did you mean: 'scale'? 报错出现在web_demo.py的第103行: result_text = gr.components.Chatbot(label='Multi-round conversation History', value=[("", "Hi, What do you want to know about this image?")]).style(height=550) 我在尝试了以下几种方法但没有成功: 1.更新gradio后(目前版本4.1.2),没有解决这个问题 2.将.style(height=550)换成.scale(height=550)会报返回值为空; 3.将.style(height=550)直接去掉后,没有报错,但会有warning,最后会直接退出web_demo的运行 希望可以帮忙解决,谢谢!!

1049451037 commented 11 months ago

@lykeven Hi, Yan, could you help with this issue?

hzh0720 commented 11 months ago

解决了! 问题出现在gradio在4.0版本以后去除了.style()函数 解决办法是将gradio回退到4.0以前,之后便可以正常运行

stonetears commented 6 months ago

we can use gradio 4.* like this : Chatbot().height=500