Update app.py
Browse files
app.py
CHANGED
@@ -121,6 +121,14 @@ with gr.Blocks(css=css) as demo:
|
|
121 |
cache_examples="lazy"
|
122 |
)
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
gr.on(
|
125 |
triggers=[run_button.click, prompt.submit],
|
126 |
fn = infer,
|
|
|
121 |
cache_examples="lazy"
|
122 |
)
|
123 |
|
124 |
+
def greet(name):
|
125 |
+
return "Hello " + name + "! Imagine an image with Flux"
|
126 |
+
|
127 |
+
name = gr.Textbox(label="Name")
|
128 |
+
output = gr.Textbox(label="Output Box")
|
129 |
+
greet_btn = gr.Button("Greet")
|
130 |
+
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
|
131 |
+
|
132 |
gr.on(
|
133 |
triggers=[run_button.click, prompt.submit],
|
134 |
fn = infer,
|