Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,7 @@ def main():
|
|
96 |
state.youtube_url, state.chunk_duration_ms, state.pad_duration_ms
|
97 |
)
|
98 |
state.chunks_taken = 0
|
99 |
-
state.lines = deque([], maxlen=
|
100 |
|
101 |
player = st_player(state.youtube_url, **player_options, key="youtube_player")
|
102 |
|
@@ -108,7 +108,7 @@ def main():
|
|
108 |
state.lines.append(text)
|
109 |
state.chunks_taken += 1
|
110 |
if "lines" in state:
|
111 |
-
# print the
|
112 |
st.code("\n".join(state.lines))
|
113 |
|
114 |
|
|
|
96 |
state.youtube_url, state.chunk_duration_ms, state.pad_duration_ms
|
97 |
)
|
98 |
state.chunks_taken = 0
|
99 |
+
state.lines = deque([], maxlen=10) # limit to the last 10 lines of subs
|
100 |
|
101 |
player = st_player(state.youtube_url, **player_options, key="youtube_player")
|
102 |
|
|
|
108 |
state.lines.append(text)
|
109 |
state.chunks_taken += 1
|
110 |
if "lines" in state:
|
111 |
+
# print the lines of subs
|
112 |
st.code("\n".join(state.lines))
|
113 |
|
114 |
|