CB commited on
Commit
a190913
Β·
verified Β·
1 Parent(s): 04b518f

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +6 -6
streamlit_app.py CHANGED
@@ -63,7 +63,7 @@ st.sidebar.text_input(
63
  on_change=_remove_video,
64
  )
65
 
66
- expander = st.sidebar.expander("Options", expanded=False)
67
  # βœ… Configure Gemini API
68
  API_KEY = expander.text_input("Google API Key", "AIzaSyB2uDj6IeuNszSuk80feW-eBgpIDH0WFSY")
69
  # βœ… Check if API key is available
@@ -152,7 +152,7 @@ def convert_video_to_mp4(video_path):
152
  return target_path
153
 
154
  if st.session_state["url"]:
155
- download = st.sidebar.button("Load Video", use_container_width=True)
156
  if download:
157
  download_options = {}
158
  if st.session_state["video-password"]:
@@ -168,9 +168,8 @@ if st.session_state["videos"]:
168
  st.sidebar.video(st.session_state["videos"], loop=True)
169
  except Exception as e:
170
  st.write("Couldn't show video")
171
- st.sidebar.write("**Title**:", st.session_state["videos"].split("/")[-1])
172
 
173
- with st.sidebar.expander("Download or Clear Video", expanded=False):
174
  st.button("Clear Video πŸ”₯", on_click=_remove_all_videos, type="secondary", help="Clear all downloaded videos", use_container_width=True,)
175
 
176
  try:
@@ -185,11 +184,12 @@ if st.session_state["videos"]:
185
  )
186
  except Exception as e:
187
  st.error("Failed downloading the video", icon="πŸ˜”")
188
-
 
189
  # --- Streamlit App ---
190
 
191
  # Main content
192
- if st.button('**Generate the story**'):
193
 
194
  try:
195
  with st.spinner("Generating the story of the video"):
 
63
  on_change=_remove_video,
64
  )
65
 
66
+ expander = st.sidebar.expander("Settings", expanded=False)
67
  # βœ… Configure Gemini API
68
  API_KEY = expander.text_input("Google API Key", "AIzaSyB2uDj6IeuNszSuk80feW-eBgpIDH0WFSY")
69
  # βœ… Check if API key is available
 
152
  return target_path
153
 
154
  if st.session_state["url"]:
155
+ download = st.sidebar.button("**Load Video** πŸš€", use_container_width=True)
156
  if download:
157
  download_options = {}
158
  if st.session_state["video-password"]:
 
168
  st.sidebar.video(st.session_state["videos"], loop=True)
169
  except Exception as e:
170
  st.write("Couldn't show video")
 
171
 
172
+ with st.sidebar.expander("Options", expanded=False):
173
  st.button("Clear Video πŸ”₯", on_click=_remove_all_videos, type="secondary", help="Clear all downloaded videos", use_container_width=True,)
174
 
175
  try:
 
184
  )
185
  except Exception as e:
186
  st.error("Failed downloading the video", icon="πŸ˜”")
187
+
188
+ st.sidebar.write("**Title**:", st.session_state["videos"].split("/")[-1])
189
  # --- Streamlit App ---
190
 
191
  # Main content
192
+ if st.button('**Generate the story**', type="primary"):
193
 
194
  try:
195
  with st.spinner("Generating the story of the video"):