Spaces:
Sleeping
Sleeping
Théo Rousseaux
commited on
Commit
·
cdb28da
1
Parent(s):
b2c4215
convert H264
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ from Modules.PoseEstimation.pose_agent import agent_executor
|
|
14 |
|
15 |
mistral_api_key = os.getenv("MISTRAL_API_KEY")
|
16 |
from Modules.PoseEstimation import pose_estimator
|
17 |
-
from utils import save_uploaded_file
|
18 |
|
19 |
|
20 |
st.set_page_config(layout="wide", initial_sidebar_state="collapsed")
|
@@ -97,8 +97,9 @@ with col2:
|
|
97 |
predict_list.sort()
|
98 |
predict_dir = predict_list[-1]
|
99 |
file_name = os.listdir(os.path.join('/home/user/.pyenv/runs', 'pose', predict_dir))[0]
|
100 |
-
|
101 |
-
|
|
|
102 |
else :
|
103 |
st.video(video_uploaded)
|
104 |
|
|
|
14 |
|
15 |
mistral_api_key = os.getenv("MISTRAL_API_KEY")
|
16 |
from Modules.PoseEstimation import pose_estimator
|
17 |
+
from utils import save_uploaded_file, encode_video_H264
|
18 |
|
19 |
|
20 |
st.set_page_config(layout="wide", initial_sidebar_state="collapsed")
|
|
|
97 |
predict_list.sort()
|
98 |
predict_dir = predict_list[-1]
|
99 |
file_name = os.listdir(os.path.join('/home/user/.pyenv/runs', 'pose', predict_dir))[0]
|
100 |
+
file_path =os.path.join('/home/user/.pyenv/runs', 'pose', predict_dir, file_name)
|
101 |
+
file_path = encode_video_H264(file_path, remove_original=True)
|
102 |
+
st.video(file_path, loop=True)
|
103 |
else :
|
104 |
st.video(video_uploaded)
|
105 |
|