sd3-api / app.py
ciaochaos's picture
update
8370647
raw
history blame
446 Bytes
import gradio as gr
def greet(name):
return "Hello " + name + "!"
with gr.Blocks() as demo:
with gr.Row():
with gr.Column(scale=1):
text1 = gr.Textbox(label="API Key")
name = gr.Textbox(label="Prompt")
greet_btn = gr.Button("Greet")
with gr.Column(scale=1):
output = gr.Image()
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
demo.launch()