天问 41fc6e91c0 Update 'README.md' | 2 months ago | |
---|---|---|
README.md | 2 months ago |
证件照生成
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@Contact : liuyuqi.gov@msn.cn
@Time : 2024/09/08 10:21:06
@License : Copyright © 2017-2022 liuyuqi. All Rights Reserved.
@Desc :
pip install gradio_client
'''
from gradio_client import Client, handle_file
client = Client("jianboy/HivisionIDPhotos")
result = client.predict(
input_image=handle_file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
mode_option="尺寸列表",
size_list_option="一寸 (413, 295)",
color_option="蓝色",
render_option="纯色",
image_kb_options="不设置",
custom_color_R=0,
custom_color_G=0,
custom_color_B=0,
custom_size_height=413,
custom_size_width=295,
custom_image_kb=50,
language="中文",
matting_model_option="modnet_photographic_portrait_matting",
face_detect_option="mtcnn",
api_name="/idphoto_inference"
)
print(result)
if __name__=='__main__':
pass