File size: 662 Bytes
901dbf6
37ab852
901dbf6
 
73bc32e
 
901dbf6
73bc32e
901dbf6
 
37ab852
 
 
 
901dbf6
 
4e2c209
901dbf6
37ab852
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import streamlit as st
from utilitis import Draw,Add_Results
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 = 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')
    st.sidebar.table(Results)
    Add_Results(Results)