conda环境下‘Textbox‘ object has no attribute ‘style‘问题解决

1 问题描述

在本地部署chatglm2-6B的时候可能出现,运行web_demo.py,出现如下错误:

(chatglm) [root@localhost ChatGLM2-6B]# python web_demo.py 
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:37<00:00,  5.31s/it]
Traceback (most recent call last):
  File "/opt/ChatGLM2-6B/web_demo.py", line 89, in <module>
    user_input = gr.Textbox(show_label=False, placeholder="Input...", lines=10).style(
AttributeError: 'Textbox' object has no attribute 'style'

2 问题分析

使用pip list查看本地已经安装的工具包版本,如下所示:

(chatglm) [root@localhost ChatGLM2-6B]# pip list
Package                   Version
------------------------- ------------
accelerate                0.25.0
aiofiles                  23.2.1
altair                    5.2.0
annotated-types           0.6.0
anyio                     4.2.0
attrs                     23.2.0
blinker                   1.7.0
cachetools                5.3.2
certifi                   2023.11.17
charset-normalizer        3.3.2
click                     8.1.7
colorama                  0.4.6
contourpy                 1.2.0
cpm-kernels               1.0.11
cycler                    0.12.1
exceptiongroup            1.2.0
fastapi                   0.108.0
ffmpeg-python             0.2.0
ffmpy                     0.3.1
filelock                  3.13.1
fonttools                 4.47.0
fsspec                    2023.12.2
gitdb                     4.0.11
GitPython                 3.1.40
gradio                    4.12.0
gradio_client             0.8.0
h11                       0.14.0
httpcore                  1.0.2
httpx                     0.26.0
huggingface-hub
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

源启智能

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值