Commit
·
3cae8c2
1
Parent(s):
f52301c
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,13 @@ def generate():
|
|
| 9 |
with gr.Blocks() as demo:
|
| 10 |
btn = gr.Button("Generate")
|
| 11 |
out = gr.Textbox(label="Generation")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
btn.click(fn=generate, outputs=out)
|
| 13 |
|
| 14 |
demo.launch(debug=True)
|
|
|
|
| 9 |
with gr.Blocks() as demo:
|
| 10 |
btn = gr.Button("Generate")
|
| 11 |
out = gr.Textbox(label="Generation")
|
| 12 |
+
|
| 13 |
+
def change_visibility():
|
| 14 |
+
return {
|
| 15 |
+
out: gr.update(visible=True)
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
btn.click(fn=change_visibility, outputs=out)
|
| 19 |
btn.click(fn=generate, outputs=out)
|
| 20 |
|
| 21 |
demo.launch(debug=True)
|