Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用ernie_vilg,提供了AK,SK,依然不能连接 #2337

Open
BarryYin opened this issue Nov 27, 2024 · 0 comments
Open

使用ernie_vilg,提供了AK,SK,依然不能连接 #2337

BarryYin opened this issue Nov 27, 2024 · 0 comments
Assignees

Comments

@BarryYin
Copy link

欢迎您反馈PaddleHub使用问题,非常感谢您对PaddleHub的贡献!
在留下您的问题时,辛苦您同步提供如下信息:

  • 版本、环境信息
    1)PaddleHub和PaddlePaddle版本:请提供您的PaddleHub和PaddlePaddle版本号,例如PaddleHub1.4.1,PaddlePaddle1.6.2
    2)系统环境:请您描述系统类型,例如Linux/Windows/MacOS/,python版本
  • 复现信息:如为报错,请给出复现环境、复现步骤

在aistudio里运行

os.environ["WENXIN_AK"] = "" # 替换为你的 API Key

os.environ["WENXIN_SK"] = "" # 替换为你的 Secret Key

import paddlehub as hub
module = hub.Module(name="ernie_vilg")
results = module.generate_image(text_prompts=["波涛汹涌的大海"])


/.paddlehub/modules/ernie_vilg/module.py in _apply_token(self, ak, sk)
51 if res['code'] != 0:
52 print('Request access token error.')
---> 53 raise RuntimeError("Request access token error.")
54 else:
55 print('Request access token error.')
RuntimeError: Request access token error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants