ITSAIDI
sdc
ab1449b
raw
history blame
787 Bytes
import streamlit as st
from utilitis import Draw,Add_Results,Change_Image
from PIL import Image
st.title("Bienvenue à Textra Web App")
st.markdown("### Drag and Drop votre facture ici:")
st.write("(PNG, JPG, JPEG)")
uploaded_file = st.file_uploader("Ou selectioner une image:", type=["png", "jpg", "jpeg"], accept_multiple_files=False)
if uploaded_file is not None:
image_initiale = Image.open(uploaded_file)
image_initiale = image_initiale.convert("RGB")
image = Image.open(uploaded_file)
image = image.convert("RGB")
image,Results = Draw(image)
#st.write("Predicted Text:",type(image))
st.image(image, caption="Uploaded Image", use_column_width=True)
st.sidebar.title('Results')
Change_Image(image,image_initiale)
Add_Results(Results)