lucio commited on
Commit
2f42c1a
1 Parent(s): e4a22f3

fix text display

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- yield text
 
 
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 = ""