ValueError: Could not fetch api info for https://qwen-qwen2-5-max-demo.ms.show/ #1208
Replies: 1 comment
-
duplicate of #1207 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
使用魔达社区的Qwen2.5-Max,在使用API调用时 https://qwen-qwen2-5-max-demo.ms.show/ ,出现以下错误:
Loaded as API: https://qwen-qwen2-5-max-demo.ms.show/ ✔
Traceback (most recent call last):
File "E:\pythonProjectWork\xiaolv\11.py", line 20, in
client = Client("https://qwen-qwen2-5-max-demo.ms.show/", download_files=False, headers=headers)
File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\gradio_client\client.py", line 171, in init
self._info = self._get_api_info()
File "C:\Users\admin\AppData\Roaming\Python\Python39\site-packages\gradio_client\client.py", line 566, in _get_api_info
raise ValueError(f"Could not fetch api info for {self.src}: {r.text}")
ValueError: Could not fetch api info for https://qwen-qwen2-5-max-demo.ms.show/:
调用的代码如下:
from gradio_client import Client
client = Client("https://qwen-qwen2-5-max-demo.ms.show/", download_files=False, headers=headers)
result = client.predict(
query="Hello!!",
history=[],
system="You are a helpful assistant.",
api_name="/model_chat"
)
print(result)
header数据包含:'Referer'、'user-agent'、'Cookie'字段。
请问该如何修改代码或者需要加入什么参数才能成功调用?
Beta Was this translation helpful? Give feedback.
All reactions