Open Xingeqwd opened 1 month ago
看着估计 别用api name 改fn index调用就行
看着估计 别用api name 改fn index调用就行
不会改啊,大佬,文档翻不出什么头绪 应该不会只是改api name吧,右边带的内容不知要写什么?
看着估计 别用api name 改fn index调用就行
不会改啊,大佬,文档翻不出什么头绪 应该不会只是改api name吧,右边带的内容不知要写什么?
你不是已经截出源码了吗 在gradio api打开例程 适配一下就行了
看着估计 别用api name 改fn index调用就行
不会改啊,大佬,文档翻不出什么头绪 应该不会只是改api name吧,右边带的内容不知要写什么?
你不是已经截出源码了吗 在gradio api打开例程 适配一下就行了
大佬,不好意思,这几个词分开看都看得懂,加在一起就看不明白, 这两个应该没猜错: 你指的源码是那段出问题的吧,适配是把他改成fn index 有一个事情不太清楚,请教一下: 例程不知是指的什么?
看着估计 别用api name 改fn index调用就行
不会改啊,大佬,文档翻不出什么头绪 应该不会只是改api name吧,右边带的内容不知要写什么?
你不是已经截出源码了吗 在gradio api打开例程 适配一下就行了
大佬,不好意思,这几个词分开看都看得懂,加在一起就看不明白, 这两个应该没猜错: 你指的源码是那段出问题的吧,适配是把他改成fn index 有一个事情不太清楚,请教一下: 例程不知是指的什么?
webui 最底下 api打开有文档
看着估计 别用api name 改fn index调用就行
不会改啊,大佬,文档翻不出什么头绪 应该不会只是改api name吧,右边带的内容不知要写什么?
你不是已经截出源码了吗 在gradio api打开例程 适配一下就行了
大佬,不好意思,这几个词分开看都看得懂,加在一起就看不明白, 这两个应该没猜错: 你指的源码是那段出问题的吧,适配是把他改成fn index 有一个事情不太清楚,请教一下: 例程不知是指的什么?
webui 最底下 api打开有文档
是了,我还以为是gradio的官方文档,会错意了
因为digital_human这边的port只有一个,放视频的界面,没有webui 我去wav2lip的webui那边找到了api文档
不过不知道适配怎么做,还是来请教一下。。。 我有试过直接把api_name改成fn_index带个0,不过可想而知的肯定是报错了 要把这么一大段塞到api_server.py里面,想不到什么好办法(还是gradio学的不到家,贻笑大方了)
(如图,文字下列) ———————————— ————————————
fn_index: 0
copy
from gradio_client import Client
client = Client("http://192.168.188.223:27861/")
result = client.predict(
"https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf", # str (filepath on your computer (or URL) of file) in 'Video or Image' File component
"https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf", # str (filepath on your computer (or URL) of file) in 'Audio' File component
"wav2lip", # str in 'Checkpoint' Radio component
True, # bool in 'No Smooth' Checkbox component
1, # int | float (numeric value between 1 and 4) in 'Resize Factor' Slider component
0, # int | float (numeric value between 0 and 50) in 'Pad Top' Slider component
0, # int | float (numeric value between 0 and 50) in 'Pad Bottom (Often increasing this to 20 allows chin to be included' Slider component
0, # int | float (numeric value between 0 and 50) in 'Pad Left' Slider component
0, # int | float (numeric value between 0 and 50) in 'Pad Right' Slider component
fn_index=0
)
print(result)
Return Type(s)
# str (filepath on your computer (or URL) of file) representing output in 'value_18' Video component
—————————— 咳咳咳,感谢大佬,大佬辛苦了,大佬威武——
看着估计 别用api name 改fn index调用就行
不会改啊,大佬,文档翻不出什么头绪 应该不会只是改api name吧,右边带的内容不知要写什么?
你不是已经截出源码了吗 在gradio api打开例程 适配一下就行了
大佬,不好意思,这几个词分开看都看得懂,加在一起就看不明白, 这两个应该没猜错: 你指的源码是那段出问题的吧,适配是把他改成fn index 有一个事情不太清楚,请教一下: 例程不知是指的什么?
webui 最底下 api打开有文档
是了,我还以为是gradio的官方文档,会错意了
因为digital_human这边的port只有一个,放视频的界面,没有webui 我去wav2lip的webui那边找到了api文档
不过不知道适配怎么做,还是来请教一下。。。 我有试过直接把api_name改成fn_index带个0,不过可想而知的肯定是报错了 要把这么一大段塞到api_server.py里面,想不到什么好办法(还是gradio学的不到家,贻笑大方了)
(如图,文字下列) ———————————— ————————————
fn_index: 0 copy from gradio_client import Client client = Client("http://192.168.188.223:27861/") result = client.predict( "https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf", # str (filepath on your computer (or URL) of file) in 'Video or Image' File component "https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf", # str (filepath on your computer (or URL) of file) in 'Audio' File component "wav2lip", # str in 'Checkpoint' Radio component True, # bool in 'No Smooth' Checkbox component 1, # int | float (numeric value between 1 and 4) in 'Resize Factor' Slider component 0, # int | float (numeric value between 0 and 50) in 'Pad Top' Slider component 0, # int | float (numeric value between 0 and 50) in 'Pad Bottom (Often increasing this to 20 allows chin to be included' Slider component 0, # int | float (numeric value between 0 and 50) in 'Pad Left' Slider component 0, # int | float (numeric value between 0 and 50) in 'Pad Right' Slider component fn_index=0 ) print(result) Return Type(s) # str (filepath on your computer (or URL) of file) representing output in 'value_18' Video component
—————————— 咳咳咳,感谢大佬,大佬辛苦了,大佬威武——
单独跑例程先试试 参数按照webui的配置改上去 测一测先 然后改到播放器里去。 例程一般改改参数就能用 不能用的话 可能是gradio版本问题
这边是linux,x86平台
确认了wav2lip正常(毕竟是不久前刚刚搭的),api页面也能进得去,网络也都是通的, 上github对了一下,文件也都是对的 但就是莫名其妙地报了这个错,太怪了
Google查了一通,发现竟然没有跟我一样的, 看到网上说,函数调用要用fn_index,api调用可以用api_name。。。"gradio_api_type"那边也的确是这样配的 ——毕竟其他人都没出问题啊,证明肯定不是程序的问题,但是文件也没动过,wav2lip又挺正常。。。 文件肯定也是存在的,权限之类的也没问题
至少可以确定,应该肯定是gradio方面问题了。。。
—————————— 附POST请求语句
api_server.py那边的附近段落如下(22-58行附近)
如果注释掉那一行,会变成
以及最新一次的日志
感谢各位大佬!各位大佬辛苦了,恭喜发财