Spaces:
Sleeping
Sleeping
Nico8800
commited on
Commit
·
4c18e6f
1
Parent(s):
e87f4b7
add upload video
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ import base64
|
|
| 6 |
st.set_page_config(layout="wide", initial_sidebar_state="collapsed")
|
| 7 |
# Create two columns
|
| 8 |
col1, col2 = st.columns(2)
|
|
|
|
| 9 |
|
| 10 |
# First column containers
|
| 11 |
with col1:
|
|
@@ -36,20 +37,26 @@ with col1:
|
|
| 36 |
|
| 37 |
with st.chat_message("assistant"):
|
| 38 |
# Build answer from LLM
|
| 39 |
-
response = " to be DEFINED
|
| 40 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
| 41 |
|
| 42 |
st.subheader("Movement Analysis")
|
| 43 |
-
|
| 44 |
# Second column containers
|
| 45 |
with col2:
|
| 46 |
st.subheader("Sports Agenda")
|
| 47 |
-
|
| 48 |
st.subheader("Video Analysis")
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
st.subheader("Graph Displayer")
|
|
|
|
|
|
| 6 |
st.set_page_config(layout="wide", initial_sidebar_state="collapsed")
|
| 7 |
# Create two columns
|
| 8 |
col1, col2 = st.columns(2)
|
| 9 |
+
video_uploaded = None
|
| 10 |
|
| 11 |
# First column containers
|
| 12 |
with col1:
|
|
|
|
| 37 |
|
| 38 |
with st.chat_message("assistant"):
|
| 39 |
# Build answer from LLM
|
| 40 |
+
response = " to be DEFINED "# TO DO
|
| 41 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
| 42 |
|
| 43 |
st.subheader("Movement Analysis")
|
| 44 |
+
# TO DO
|
| 45 |
# Second column containers
|
| 46 |
with col2:
|
| 47 |
st.subheader("Sports Agenda")
|
| 48 |
+
# TO DO
|
| 49 |
st.subheader("Video Analysis")
|
| 50 |
+
ask_video = st.empty()
|
| 51 |
+
if video_uploaded is None:
|
| 52 |
+
video_uploaded = ask_video.file_uploader("Choose a video file", type=["mp4", "ogg", "webm"])
|
| 53 |
+
if video_uploaded:
|
| 54 |
+
ask_video.empty()
|
| 55 |
+
with st.spin("Processing video"):
|
| 56 |
+
pass # TO DO
|
| 57 |
+
_left, mid, _right = st.columns(3)
|
| 58 |
+
with mid:
|
| 59 |
+
st.video(video_uploaded)
|
| 60 |
|
| 61 |
st.subheader("Graph Displayer")
|
| 62 |
+
# TO DO
|