feat(新功能): pose transform 逻辑修改
fix(修复bug): docs(文档变更): refactor(重构): test(增加测试):
This commit is contained in:
@@ -38,8 +38,7 @@ class PoseTransformService:
|
||||
self.image = oss_get_image(bucket=self.image_url.split('/')[0], object_name=self.image_url[self.image_url.find('/') + 1:], data_type="cv2")
|
||||
self.tasks_id = request_data.tasks_id
|
||||
self.user_id = self.tasks_id[self.tasks_id.rfind('-') + 1:]
|
||||
self.result_type = request_data.result_type
|
||||
self.gen_product_data = {'tasks_id': self.tasks_id, 'status': 'SUCCESS', 'message': "success", 'gif_url': 'test/mannequin_name.png', 'video_url': 'test/mannequin_name.png', 'type': self.result_type}
|
||||
self.gen_product_data = {'tasks_id': self.tasks_id, 'status': 'SUCCESS', 'message': "success", 'gif_url': 'test/mannequin_name.png', 'video_url': 'test/mannequin_name.png'}
|
||||
|
||||
self.redis_client.set(self.tasks_id, json.dumps(self.gen_product_data))
|
||||
self.redis_client.expire(self.tasks_id, 600)
|
||||
@@ -113,8 +112,7 @@ if __name__ == '__main__':
|
||||
rd = PoseTransformModel(
|
||||
tasks_id="123-89",
|
||||
image_url='aida-results/result_0000b606-1902-11ef-9424-0242ac180002.png',
|
||||
pose_id="1",
|
||||
result_type="gif",
|
||||
pose_id="1"
|
||||
)
|
||||
server = PoseTransformService(rd)
|
||||
print(server.get_result())
|
||||
|
||||
Reference in New Issue
Block a user