Spaces:
Running
on
Zero
Running
on
Zero
move the time.sleep
Browse files- app_dialogue.py +2 -1
app_dialogue.py
CHANGED
|
@@ -313,12 +313,13 @@ def model_inference(
|
|
| 313 |
try:
|
| 314 |
for text_token in streamer:
|
| 315 |
acc_text += text_token
|
|
|
|
| 316 |
yield acc_text
|
| 317 |
except Exception as e:
|
| 318 |
print("error")
|
| 319 |
gr.Error(e)
|
| 320 |
print(f"Success! Generated the following sequence: `{acc_text}`")
|
| 321 |
-
|
| 322 |
|
| 323 |
|
| 324 |
# Hyper-parameters for generation
|
|
|
|
| 313 |
try:
|
| 314 |
for text_token in streamer:
|
| 315 |
acc_text += text_token
|
| 316 |
+
time.sleep(0.03)
|
| 317 |
yield acc_text
|
| 318 |
except Exception as e:
|
| 319 |
print("error")
|
| 320 |
gr.Error(e)
|
| 321 |
print(f"Success! Generated the following sequence: `{acc_text}`")
|
| 322 |
+
|
| 323 |
|
| 324 |
|
| 325 |
# Hyper-parameters for generation
|