We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import gradio as gr from VisCPM import VisCPMPaint # 修改你的模型地址 model_path = '/opt/ai/VisCPM/viscpm_paint_balance_checkpoint.pt' painter = VisCPMPaint(model_path, image_safety_checker=False, prompt_safety_checker=False, add_ranker=True) print("load image model success !") def gen_img(txt, imgs): image = painter.generate(txt) imgs.append(image) return "",imgs,imgs with gr.Blocks() as demo: imgs = gr.State([]) gallery = gr.Gallery(label="生成图片") txt_message = gr.Textbox(label="输入文字") txt_message.submit(gen_img, [txt_message, imgs], [txt_message, gallery,imgs]) demo.queue(concurrency_count=1, max_size=20).launch(share=False, debug=True, server_port=7866, server_name="0.0.0.0")
以上内容来自群友分享,欢迎加入社群交流
The text was updated successfully, but these errors were encountered:
No branches or pull requests
以上内容来自群友分享,欢迎加入社群交流
The text was updated successfully, but these errors were encountered: