Skip to content

Commit

Permalink
add image_gen_lora tool,fix modelscope#455
Browse files Browse the repository at this point in the history
  • Loading branch information
mushenL committed May 24, 2024
1 parent f87b1da commit 8593404
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def call(self, params: str, **kwargs) -> str:
origin_result = json.loads(response.content.decode('utf-8'))

self.final_result = origin_result
return self.get_wordart_result()
return self.get_image_lora_result()
except Timeout:
continue
except RequestException as e:
Expand Down Expand Up @@ -134,7 +134,7 @@ def get_result(self):
'Remote call max retry times exceeded! Please try to use local call.'
)

def get_wordart_result(self):
def get_image_lora_result(self):
try:
result = self.get_result()
while True:
Expand All @@ -152,7 +152,7 @@ def get_wordart_result(self):
raise Exception(output.get('message', '任务失败,请重试'))
else:
# 继续轮询,等待一段时间后再次调用
time.sleep(3) # 等待 1 秒钟
time.sleep(3) # 等待 3 秒钟
result = self.get_result()
print(f'Running:{result}')
except Exception as e:
Expand Down

0 comments on commit 8593404

Please sign in to comment.