Update app.py
Browse files
app.py
CHANGED
@@ -122,23 +122,20 @@ if selected_type == "Upload Image":
|
|
122 |
st.info('β¨ Supports all popular image formats π· - PNG, JPG, BMP π')
|
123 |
uploaded_file = st.file_uploader("Upload Image of car's number plate π", type=["png","jpg","bmp","jpeg"])
|
124 |
|
|
|
|
|
125 |
if uploaded_file is not None:
|
126 |
|
127 |
-
|
128 |
#image = Image.open(uploaded_file).convert('RGB')
|
129 |
-
|
130 |
-
|
131 |
-
with open(uploaded_file,'rb') as imge:
|
132 |
-
img_bytes = imge.read()
|
133 |
-
|
134 |
-
img = Image.open(io.BytesIO(img_bytes))
|
135 |
|
136 |
#img = io.BytesIO(image)
|
137 |
#img = cv2.imdecode(image, cv2.IMREAD_COLOR)
|
138 |
|
139 |
|
140 |
with st.spinner(f"Working... π«"):
|
141 |
-
result = FINAL(
|
142 |
|
143 |
st.image(result)
|
144 |
|
|
|
122 |
st.info('β¨ Supports all popular image formats π· - PNG, JPG, BMP π')
|
123 |
uploaded_file = st.file_uploader("Upload Image of car's number plate π", type=["png","jpg","bmp","jpeg"])
|
124 |
|
125 |
+
image = np.array(Image.open(uploaded_file))
|
126 |
+
|
127 |
if uploaded_file is not None:
|
128 |
|
129 |
+
image = np.array(Image.open(uploaded_file))
|
130 |
#image = Image.open(uploaded_file).convert('RGB')
|
131 |
+
st.image(image, use_column_width=True)
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
#img = io.BytesIO(image)
|
134 |
#img = cv2.imdecode(image, cv2.IMREAD_COLOR)
|
135 |
|
136 |
|
137 |
with st.spinner(f"Working... π«"):
|
138 |
+
result = FINAL(image)
|
139 |
|
140 |
st.image(result)
|
141 |
|