Spaces:
Build error
Build error
Paul Ke commited on
Update streamlit_app.py
Browse files- streamlit_app.py +7 -1
streamlit_app.py
CHANGED
|
@@ -171,8 +171,14 @@ if st.button('Generate the story'):
|
|
| 171 |
|
| 172 |
try:
|
| 173 |
with st.spinner("Generating the story of the video"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
# AI agent processing
|
| 175 |
-
response = multimodal_Agent.run(analysis_prompt, videos=[
|
| 176 |
|
| 177 |
st.subheader('Analysis Result')
|
| 178 |
st.markdown(response.content)
|
|
|
|
| 171 |
|
| 172 |
try:
|
| 173 |
with st.spinner("Generating the story of the video"):
|
| 174 |
+
# Upload and process the video
|
| 175 |
+
processed_video = upload_file(video_path)
|
| 176 |
+
while processed_video.state.name == "PROCESSING":
|
| 177 |
+
time.sleep(1)
|
| 178 |
+
processed_video = get_file(processed_video.name)
|
| 179 |
+
|
| 180 |
# AI agent processing
|
| 181 |
+
response = multimodal_Agent.run(analysis_prompt, videos=[processed_video], safety_settings=safety_settings)
|
| 182 |
|
| 183 |
st.subheader('Analysis Result')
|
| 184 |
st.markdown(response.content)
|