Spaces:
Build error
Build error
Paul Ke commited on
Update streamlit_app.py
Browse files- streamlit_app.py +6 -1
streamlit_app.py
CHANGED
|
@@ -184,7 +184,12 @@ if st.button('Generate the story'):
|
|
| 184 |
try:
|
| 185 |
with st.spinner("Generating the story of the video"):
|
| 186 |
# Upload and process the video
|
| 187 |
-
processed_video = upload_file(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
while processed_video.state.name == "PROCESSING":
|
| 189 |
time.sleep(1)
|
| 190 |
processed_video = get_file(processed_video.name)
|
|
|
|
| 184 |
try:
|
| 185 |
with st.spinner("Generating the story of the video"):
|
| 186 |
# Upload and process the video
|
| 187 |
+
processed_video = upload_file(
|
| 188 |
+
data=video_file,
|
| 189 |
+
file_name=f"{st.session_state['videos'].lower().translate(str.maketrans('', '', string.punctuation)).replace(' ', '_')}.mp4",
|
| 190 |
+
mime="video/mp4",
|
| 191 |
+
type="primary",)
|
| 192 |
+
|
| 193 |
while processed_video.state.name == "PROCESSING":
|
| 194 |
time.sleep(1)
|
| 195 |
processed_video = get_file(processed_video.name)
|