166 with b:
167 show_vid = st.video(uploaded_video)
168
169 # a, b, c = st.columns(3)170 # with a:
171 # display_dial("FPS", f"{stats['fps']}", "#1C83E1")
172 # with b:
156
157 #Post request with video file
158 with st_lottie_spinner(lottie_model_loading):
159 # url = "https://syncv6-eagwezifvq-an.a.run.app/vid_stats"160 url = "http://127.0.0.1:8000/vid_stats"
161 files = {"file": (uploaded_video.name, uploaded_video, "multipart/form-data")}
162 stats = requests.post(url, files=files).json()
116 #Load processed video
117 video_url = response['output_url']
118 st.video(video_url)
119 # video_file = open('video.mp4', 'rb')120 # video_bytes = video_file.read()
121 # st.video(video_bytes)
122
97
98 st.write("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
99 st.write('The following graph shows your average synchronisation error, smoothed for easier reference of intervals needing improvement or attention.')
100 # st.line_chart(data=df, x='Time', y='Smoothed Sync Error')101 fig2 = go.Figure()
102 fig2.add_trace(go.Scatter(x=df.index, y=list(df['Smoothed Sync Error'])))
103 fig2.update_layout(
79 #Plot moving average graph
80 st.write("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
81 st.write('The following graph shows your absolute synchronisation error, calculated as a difference in pose/angle of major joints relative to each other. A lower value is a smaller difference, and therefore better synchronization. Peaks are areas of lowest synchronisation.')
82 # st.line_chart(data=df, x='Time', y='Sync Error') 83 fig1 = go.Figure()
84 fig1.add_trace(go.Scatter(x=df.index, y=list(df['Sync Error'])))
85 fig1.update_layout(
It is recommended to remove any commented code in your codebase.
for item in sequence:
# print(item)
do_something(item)
# def old_function():
# '''Older implementation that has been replaced'''
# data = get_data()
# api.post(data)
for item in sequence:
do_something(item)