Spaces:
Build error
Build error
CB commited on
Update streamlit_app.py
Browse files- 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("
|
| 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("
|
| 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"):
|