Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhahaha committed Nov 21, 2023
1 parent 7ba41f7 commit aa782fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/agentfabric/config/builder_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
}
},
"model": "qwen-max"
}
}
7 changes: 5 additions & 2 deletions modelscope_agent/tools/text_to_image_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class TextToImageTool(ModelscopePipelineTool):
}
}, {
'name': 'resolution',
'description': '格式是 数字*数字,表示希望生成的图像的分辨率大小,选项有[1024*1024, 720*1280, 1280*720]',
'description':
'格式是 数字*数字,表示希望生成的图像的分辨率大小,选项有[1024*1024, 720*1280, 1280*720]',
'required': True,
'schema': {
'type': 'string'
Expand All @@ -46,7 +47,9 @@ class TextToImageTool(ModelscopePipelineTool):

def _remote_call(self, *args, **kwargs):

if ('resolution' in kwargs) and (kwargs['resolution'] in ['1024*1024', '720*1280', '1280*720']):
if ('resolution' in kwargs) and (kwargs['resolution'] in [
'1024*1024', '720*1280', '1280*720'
]):
resolution = kwargs['resolution']
else:
resolution = '1280*720'
Expand Down

0 comments on commit aa782fd

Please sign in to comment.