File size: 630 Bytes
530a0a9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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()