import streamlit as st from PIL import Image import os #Trick to not init function multitime if "ocr_detector" not in st.session_state: print("INIT MODEL") os.system("wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb") os.system("sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb") from src.setup import Setup Setup().ocr_model_downloader() from src.OCR import OCRDetector st.session_state.ocr_detector = OCRDetector() print("DONE INIT MODEL") st.set_page_config(page_title="Vietnamese OCR", layout="wide", page_icon = "./storage/linhai.jpeg") hide_menu_style = """ """ st.markdown(hide_menu_style, unsafe_allow_html= True) st.markdown( """