【bugo】【gradio使用】gradio可以正常使用,但是调用接口报错422 Unprocessable Entity

举报
object 发表于 2025/07/04 18:39:54 2025/07/04
【摘要】 问题现象gradio项目可以正常启动,但是页面使用时,接口报错,提示422 Unprocessable Entity根因1.gradio版本问题解决方案1.升级gradio版本pip install gradio==3.36.1也是通过cmd在项目目录下执行即可2.可能升级后还会有一个小的告警(不影响使用)UserWarning: Could not get documentation gr...

问题现象

gradio项目可以正常启动,但是页面使用时,接口报错,提示422 Unprocessable Entity

根因

1.gradio版本问题

解决方案

1.升级gradio版本
pip install gradio==3.36.1
也是通过cmd在项目目录下执行即可

2.可能升级后还会有一个小的告警(不影响使用)
UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix'
warnings.warn(f"Could not get documentation group for {cls}: {exc}")

建议直接升级到4.43.0
pip install gradio==4.43.0

参考:
Issue #60 · clue-ai/ChatYuan

【版权声明】本文为华为云社区用户原创内容,未经允许不得转载,如需转载请自行联系原作者进行授权。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。