fix text display
Browse files
app.py
CHANGED
@@ -69,8 +69,10 @@ def stream_text(url, chunk_duration_ms, pad_duration_ms):
|
|
69 |
if " " in text:
|
70 |
text, leftover_text = text.rsplit(" ", 1)
|
71 |
else:
|
72 |
-
leftover_text =
|
73 |
-
|
|
|
|
|
74 |
else:
|
75 |
yield leftover_text
|
76 |
leftover_text = ""
|
|
|
69 |
if " " in text:
|
70 |
text, leftover_text = text.rsplit(" ", 1)
|
71 |
else:
|
72 |
+
leftover_text = text
|
73 |
+
text = ""
|
74 |
+
if text:
|
75 |
+
yield text
|
76 |
else:
|
77 |
yield leftover_text
|
78 |
leftover_text = ""
|