OmidSakaki commited on
Commit
df7da7d
Β·
verified Β·
1 Parent(s): 71bc669

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
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
- #image = Image.open(io.BytesIO(uploaded_file)).convert('RGB')
128
  #image = Image.open(uploaded_file).convert('RGB')
129
- #st.image(image, use_column_width=True)
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(img)
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