show plots before stitching
Browse files
app.py
CHANGED
@@ -213,9 +213,6 @@ def strike(url, speedup_factor, min_speedup, max_speedup, max_num_segments):
|
|
213 |
total_duration,
|
214 |
)
|
215 |
|
216 |
-
with st.spinner("stitching segments..."):
|
217 |
-
cat_clips(squashed_times, speedups, audio_path, output_path)
|
218 |
-
|
219 |
times = np.array([(seg["start"] + seg["end"]) / 2 for seg in segments])
|
220 |
times /= 60
|
221 |
annotations = [seg["text"] for seg in segments]
|
@@ -254,9 +251,6 @@ def strike(url, speedup_factor, min_speedup, max_speedup, max_num_segments):
|
|
254 |
st.altair_chart(chart, use_container_width=True)
|
255 |
st.info("hover over the plot above this message to read the transcript")
|
256 |
|
257 |
-
st.write("sped-up audio:")
|
258 |
-
st.audio(output_path)
|
259 |
-
|
260 |
times = sum([list(x) for x in squashed_times], [])
|
261 |
times = np.array(times)
|
262 |
times /= 60
|
@@ -281,6 +275,12 @@ def strike(url, speedup_factor, min_speedup, max_speedup, max_num_segments):
|
|
281 |
)
|
282 |
st.altair_chart(lines.interactive(), use_container_width=True)
|
283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
|
285 |
st.markdown(
|
286 |
"""
|
|
|
213 |
total_duration,
|
214 |
)
|
215 |
|
|
|
|
|
|
|
216 |
times = np.array([(seg["start"] + seg["end"]) / 2 for seg in segments])
|
217 |
times /= 60
|
218 |
annotations = [seg["text"] for seg in segments]
|
|
|
251 |
st.altair_chart(chart, use_container_width=True)
|
252 |
st.info("hover over the plot above this message to read the transcript")
|
253 |
|
|
|
|
|
|
|
254 |
times = sum([list(x) for x in squashed_times], [])
|
255 |
times = np.array(times)
|
256 |
times /= 60
|
|
|
275 |
)
|
276 |
st.altair_chart(lines.interactive(), use_container_width=True)
|
277 |
|
278 |
+
with st.spinner("stitching segments..."):
|
279 |
+
cat_clips(squashed_times, speedups, audio_path, output_path)
|
280 |
+
|
281 |
+
st.write("sped-up audio:")
|
282 |
+
st.audio(output_path)
|
283 |
+
|
284 |
|
285 |
st.markdown(
|
286 |
"""
|