Spaces:
Runtime error
Runtime error
Commit
·
0f85923
1
Parent(s):
c93bd12
Update app.py
Browse files
app.py
CHANGED
@@ -3,14 +3,14 @@ import time
|
|
3 |
|
4 |
def generate_no_stream():
|
5 |
text = "Hello, this is a demo without using streaming that emulates a model"
|
6 |
-
time.sleep(2
|
7 |
return text
|
8 |
|
9 |
def generate_streaming():
|
10 |
text = "Hello, this is a demo without using streaming that emulates a model"
|
11 |
results = ""
|
12 |
for word in text.split():
|
13 |
-
time.sleep(0.
|
14 |
results += word
|
15 |
results += " "
|
16 |
yield results
|
|
|
3 |
|
4 |
def generate_no_stream():
|
5 |
text = "Hello, this is a demo without using streaming that emulates a model"
|
6 |
+
time.sleep(1.2)
|
7 |
return text
|
8 |
|
9 |
def generate_streaming():
|
10 |
text = "Hello, this is a demo without using streaming that emulates a model"
|
11 |
results = ""
|
12 |
for word in text.split():
|
13 |
+
time.sleep(0.1)
|
14 |
results += word
|
15 |
results += " "
|
16 |
yield results
|