from pathlib import Path import pandas as pd import streamlit as st from draw_utils import draw_plots st.set_page_config( layout='wide', initial_sidebar_state='auto', page_title='Face Emotion Recognition', page_icon='πŸ‘»', ) st.write("#### ΠžΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅ Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚ΠΎΠ² Π΄Π΅Ρ‚Π΅ΠΊΡ†ΠΈΠΈ Π²ΠΈΠ΄Π΅ΠΎ") csv_path = 'video_annotations.csv' @st.cache_data def load_df(): df = pd.read_csv(csv_path) return df if Path('video_annotations.csv').exists(): df = load_df() st.download_button( label='Π‘ΠΊΠ°Ρ‡Π°Ρ‚ΡŒ csv Π°Π½Π½ΠΎΡ‚Π°Ρ†ΠΈΠΈ', data=df.to_csv().encode('utf-8'), file_name=csv_path, mime='text/csv', ) draw_plots(df) else: st.write( '#### Для отобраТСния Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚ΠΎΠ² Π΄Π΅Ρ‚Π΅ΠΊΡ†ΠΈΠΈ Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ Π²ΠΈΠ΄Π΅ΠΎ' \ 'Π½Π° Π²ΠΊΠ»Π°Π΄ΠΊΠ΅ Video Detection ΠΈ Π½Π°ΠΆΠΌΠΈΡ‚Π΅ "ДСтСкция Π²ΠΈΠ΄Π΅ΠΎ"' )