From d6ac509d54c1f9ef873ed9b47647e037e87f089c Mon Sep 17 00:00:00 2001 From: chenjian Date: Wed, 17 Aug 2022 04:01:39 +0000 Subject: [PATCH] fix --- modules/image/text_to_image/ernie_vilg/module.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/image/text_to_image/ernie_vilg/module.py b/modules/image/text_to_image/ernie_vilg/module.py index 906e18cb..8d1329eb 100644 --- a/modules/image/text_to_image/ernie_vilg/module.py +++ b/modules/image/text_to_image/ernie_vilg/module.py @@ -149,12 +149,11 @@ class ErnieVilG: raise RuntimeError("API服务内部错误,可能引起原因有请求超时、模型推理错误等") elif res['code'] == 100 or res['code'] == 110 or res['code'] == 111: token = self._apply_token(ak, sk) - res = requests.post(create_url, + res = requests.post(get_url, headers={'Content-Type': 'application/x-www-form-urlencoded'}, data={ 'access_token': token, - "text": text_prompt, - "style": style + 'taskId': {taskid} }) res = res.json() if res['code'] != 0: -- GitLab