label editor
This commit is contained in:
20
app/views.py
Normal file
20
app/views.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import streamlit as st
|
||||
import os
|
||||
|
||||
def show_video_thumbnail(video):
|
||||
col1, col2, col3 = st.columns([1, 2, 1])
|
||||
video_name = video["mp4_file_name"]
|
||||
thumb = video["thumbnail_file"]
|
||||
mp4 = video["mp4_file"]
|
||||
|
||||
with col1:
|
||||
if os.path.exists(thumb):
|
||||
st.image(thumb, width="content")
|
||||
st.caption(video_name)
|
||||
|
||||
with col2:
|
||||
if os.path.exists(mp4):
|
||||
if st.button(f"▶️ Lire 📅 {video.get('record_datetime', '')} — 🕒 {video.get('day_of_week', '')}", key=f"play_{video_name}"):
|
||||
st.video(mp4)
|
||||
|
||||
return col3
|
||||
Reference in New Issue
Block a user