README.md 1018 B

HivisionIDPhotos

证件照生成

Develop

#!/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



Reference