Paul Ke commited on
Commit
1576571
·
verified ·
1 Parent(s): 9e21ede

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +3 -3
streamlit_app.py CHANGED
@@ -157,10 +157,10 @@ if st.session_state["url"]:
157
  st.session_state["videos"] = video_path
158
 
159
  if st.session_state["videos"]:
160
- st.write("**Title**:", st.session_state["videos"].split("/")[-1])
161
 
162
  try:
163
- st.video(st.session_state["videos"])
164
  except Exception as e:
165
  st.write("Couldn't show video")
166
 
@@ -172,7 +172,7 @@ if st.button('Generate the story'):
172
  try:
173
  with st.spinner("Generating the story of the video"):
174
  # Upload and process the video
175
- processed_video = open(st.session_state["videos"], "rb")
176
  while processed_video.state.name == "PROCESSING":
177
  time.sleep(1)
178
  processed_video = get_file(processed_video.name)
 
157
  st.session_state["videos"] = video_path
158
 
159
  if st.session_state["videos"]:
160
+ st.sidebar.write("**Title**:", st.session_state["videos"].split("/")[-1])
161
 
162
  try:
163
+ st.sidebar.video(st.session_state["videos"])
164
  except Exception as e:
165
  st.write("Couldn't show video")
166
 
 
172
  try:
173
  with st.spinner("Generating the story of the video"):
174
  # Upload and process the video
175
+ processed_video = open(st.session_state["videos"])
176
  while processed_video.state.name == "PROCESSING":
177
  time.sleep(1)
178
  processed_video = get_file(processed_video.name)