ITSAIDI
commited on
Commit
·
37ab852
1
Parent(s):
5ad177d
sdc
Browse files
App.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import streamlit as st
|
2 |
-
from utilitis import Draw,
|
3 |
from PIL import Image
|
4 |
|
5 |
st.title("Bienvenue à Textra Web App")
|
@@ -8,17 +8,12 @@ st.write("(PNG, JPG, JPEG)")
|
|
8 |
uploaded_file = st.file_uploader("Ou selectioner une image:", type=["png", "jpg", "jpeg"], accept_multiple_files=False)
|
9 |
|
10 |
if uploaded_file is not None:
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
image = image.convert("RGB")
|
16 |
-
return Draw(image)
|
17 |
-
|
18 |
-
# Process the image and retrieve results
|
19 |
-
image, Results = process_image(uploaded_file)
|
20 |
-
|
21 |
-
# Display the processed image and results
|
22 |
st.image(image, caption="Uploaded Image", use_column_width=True)
|
23 |
st.sidebar.title('Results')
|
24 |
Add_Results(Results)
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from utilitis import Draw,Add_Results
|
3 |
from PIL import Image
|
4 |
|
5 |
st.title("Bienvenue à Textra Web App")
|
|
|
8 |
uploaded_file = st.file_uploader("Ou selectioner une image:", type=["png", "jpg", "jpeg"], accept_multiple_files=False)
|
9 |
|
10 |
if uploaded_file is not None:
|
11 |
+
image = Image.open(uploaded_file)
|
12 |
+
image = image.convert("RGB")
|
13 |
+
image,Results = Draw(image)
|
14 |
+
#st.write("Predicted Text:",type(image))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
st.image(image, caption="Uploaded Image", use_column_width=True)
|
16 |
st.sidebar.title('Results')
|
17 |
Add_Results(Results)
|
18 |
+
|
19 |
+
|