Spaces:
Sleeping
Sleeping
Commit
·
685edaf
1
Parent(s):
edf578e
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,12 @@ import time
|
|
4 |
|
5 |
def generate():
|
6 |
text = "Hello, this is a demo without using streaming that emulates a model"
|
|
|
7 |
for word in text.split():
|
8 |
time.sleep(0.25)
|
9 |
-
|
|
|
|
|
10 |
|
11 |
gr.Interface(
|
12 |
generate,
|
|
|
4 |
|
5 |
def generate():
|
6 |
text = "Hello, this is a demo without using streaming that emulates a model"
|
7 |
+
results = ""
|
8 |
for word in text.split():
|
9 |
time.sleep(0.25)
|
10 |
+
results.append(word + " ")
|
11 |
+
yield results
|
12 |
+
|
13 |
|
14 |
gr.Interface(
|
15 |
generate,
|