File size: 577 Bytes
33adbe7 712c171 75a78b0 33adbe7 8ee75ad 75a78b0 33adbe7 7c8a4c3 80b4d52 33adbe7 ffcc874 33adbe7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
from modules.default_pipeline import process
def generate_clicked(positive_prompt):
return process(positive_prompt=positive_prompt, negative_prompt='bad, ugly')
block = gr.Blocks().queue()
with block:
with gr.Column():
prompt = gr.Textbox(label="Prompt", value='a handsome man in forest')
run_button = gr.Button(label="Run")
result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery", height=1280)
run_button.click(fn=generate_clicked, inputs=[prompt], outputs=[result_gallery])
block.launch()
|