import fn import gradio as gr with gr.Blocks() as demo: prompt = gr.Textbox(label='prompt') negative_prompt = gr.Textbox(label='negative_prompt') model = gr.Textbox(label='model') guidance_scale = gr.Textbox(value=5.0, label='guidance_scale') steps = gr.Textbox(value=20, label='steps') seed = gr.Textbox(value=-1, label='seed') run = gr.Button() dst_image = gr.Image(label="Result", interactive=False) run.click( fn=fn.run, inputs=[prompt, negative_prompt, model, guidance_scale, steps, seed], outputs=[dst_image], ) if __name__ == '__main__': demo.launch()