Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,15 +17,18 @@ if uploaded_file is not None:
|
|
17 |
video_bytes = video_file.read()
|
18 |
st.video(video_bytes)
|
19 |
|
20 |
-
|
|
|
|
|
|
|
21 |
btn = st.download_button(
|
22 |
label="Download video",
|
23 |
data=file,
|
24 |
-
file_name=
|
25 |
mime="video/mp4"
|
26 |
)
|
27 |
|
28 |
-
video_file = open(
|
29 |
video_bytes = video_file.read()
|
30 |
st.video(video_bytes)
|
31 |
|
|
|
17 |
video_bytes = video_file.read()
|
18 |
st.video(video_bytes)
|
19 |
|
20 |
+
tfile2 = tempfile.NamedTemporaryFile(delete=False)
|
21 |
+
tfile2.write(output.read())
|
22 |
+
|
23 |
+
with open(tfile2.name, "rb") as file:
|
24 |
btn = st.download_button(
|
25 |
label="Download video",
|
26 |
data=file,
|
27 |
+
file_name=tfile2.name,
|
28 |
mime="video/mp4"
|
29 |
)
|
30 |
|
31 |
+
video_file = open(tfile2.name, 'rb')
|
32 |
video_bytes = video_file.read()
|
33 |
st.video(video_bytes)
|
34 |
|