You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think you should the below code:
Duplicate of # user_input = gr.Textbox(show_label=False, placeholder="Input...", lines=10).style( container=False)
instead
user_input = gr.Textbox(show_label=False, placeholder="Input...", lines=10)
AttributeError: 'Textbox' object has no attribute 'style'. Did you mean: 'scale'
当启动web_demo.py出现上面这个错误的时候,其实是gradio的问题,版本太高了。个人猜测可能是pip默认安装最新版本,新版本中api有变化,所以识别不了。
Is there an existing issue for this?
Current Behavior
部署环境:阿里云ECS
CPU&内存:12核(vCPU) 92 GiB
操作系统:Anolis OS 8.6 RHCK 64位
GPU: NVIDIA V100
只做了路径修改:
tokenizer = AutoTokenizer.from_pretrained("/root/ChatGLM2-6B/chatglm2-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("/root/ChatGLM2-6B/chatglm2-6b", trust_remote_code=True).cuda()
运行web_demo.py报错
Loading checkpoint shards: 100%|███████████████████████████████████████████████| 7/7 [00:07<00:00, 1.10s/it]
Traceback (most recent call last):
File "web_demo.py", line 89, in
user_input = gr.Textbox(show_label=False, placeholder="Input...", lines=10).style(
AttributeError: 'Textbox' object has no attribute 'style'
运行其他一切正常
Expected Behavior
No response
Steps To Reproduce
yum install python38 -y
git clone https://github.com/THUDM/ChatGLM2-6B
pip3 install -r requirements.txt
git clone https://huggingface.co/THUDM/chatglm2-6b
vim web_demo.py
python3 web_demo.py
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: