Spaces:
Sleeping
Sleeping
Commit
·
b815d7a
1
Parent(s):
f30196a
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 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 = ""
|
|
@@ -8,10 +13,7 @@ def generate():
|
|
| 8 |
time.sleep(0.2)
|
| 9 |
results += word
|
| 10 |
results += " "
|
| 11 |
-
yield
|
| 12 |
-
textbox: gr.update(visible=True),
|
| 13 |
-
generation: results
|
| 14 |
-
}
|
| 15 |
|
| 16 |
with gr.Blocks() as demo:
|
| 17 |
btn = gr.Button("Generate")
|
|
|
|
| 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 = ""
|
|
|
|
| 13 |
time.sleep(0.2)
|
| 14 |
results += word
|
| 15 |
results += " "
|
| 16 |
+
yield results
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
with gr.Blocks() as demo:
|
| 19 |
btn = gr.Button("Generate")
|