Spaces:
Sleeping
Sleeping
osanseviero
commited on
Commit
•
3afd9ef
1
Parent(s):
b8226eb
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import time
|
3 |
|
4 |
-
def change_visibility():
|
5 |
-
return {
|
6 |
-
textbox: gr.update(visible=True)
|
7 |
-
}
|
8 |
-
|
9 |
def generate():
|
10 |
text = "Hello, this is a demo without using streaming that emulates a model"
|
11 |
results = ""
|
@@ -19,6 +14,12 @@ with gr.Blocks() as demo:
|
|
19 |
btn = gr.Button("Generate")
|
20 |
out = gr.Textbox(label="Generation", visible=False)
|
21 |
btn.click(fn=generate, outputs=out)
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
btn.click(fn=change_visibility, outputs=out)
|
23 |
|
24 |
demo.launch(debug=True)
|
|
|
1 |
import gradio as gr
|
2 |
import time
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
def generate():
|
5 |
text = "Hello, this is a demo without using streaming that emulates a model"
|
6 |
results = ""
|
|
|
14 |
btn = gr.Button("Generate")
|
15 |
out = gr.Textbox(label="Generation", visible=False)
|
16 |
btn.click(fn=generate, outputs=out)
|
17 |
+
|
18 |
+
def change_visibility():
|
19 |
+
return {
|
20 |
+
out: gr.update(visible=True)
|
21 |
+
}
|
22 |
+
|
23 |
btn.click(fn=change_visibility, outputs=out)
|
24 |
|
25 |
demo.launch(debug=True)
|