Commit
·
4e5f961
1
Parent(s):
0f85923
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,12 +2,12 @@ import gradio as gr
|
|
| 2 |
import time
|
| 3 |
|
| 4 |
def generate_no_stream():
|
| 5 |
-
text = "Hello, this is
|
| 6 |
time.sleep(1.2)
|
| 7 |
return text
|
| 8 |
|
| 9 |
def generate_streaming():
|
| 10 |
-
text = "Hello, this is
|
| 11 |
results = ""
|
| 12 |
for word in text.split():
|
| 13 |
time.sleep(0.1)
|
|
|
|
| 2 |
import time
|
| 3 |
|
| 4 |
def generate_no_stream():
|
| 5 |
+
text = "Hello, this is an example 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 an example using streaming that emulates a model ."
|
| 11 |
results = ""
|
| 12 |
for word in text.split():
|
| 13 |
time.sleep(0.1)
|