Spaces:
Sleeping
Sleeping
app.py changed
Browse files
app.py
CHANGED
@@ -47,8 +47,8 @@ def main():
|
|
47 |
display_text = "An odometer is not detected in the image!!!"
|
48 |
st.image('odometer_image.jpg', caption=f"{display_text}", use_column_width=True)
|
49 |
else:
|
50 |
-
cropped_image = gray[y1:y2, x1:x2]
|
51 |
-
|
52 |
cropped_image = cv2.resize(cropped_image, (640, 640))
|
53 |
cv2.imwrite('odometer_number_image.jpg', cropped_image)
|
54 |
|
@@ -57,8 +57,8 @@ def main():
|
|
57 |
image_path='odometer_number_image.jpg',
|
58 |
threshold=0.4
|
59 |
)
|
60 |
-
|
61 |
-
display_text = f'Here is the zoomed odometer value: {extracted_digit}
|
62 |
st.image('odometer_number_image.jpg', caption=f"{display_text}", use_column_width=True)
|
63 |
|
64 |
image = Image.open('odometer_image.jpg')
|
|
|
47 |
display_text = "An odometer is not detected in the image!!!"
|
48 |
st.image('odometer_image.jpg', caption=f"{display_text}", use_column_width=True)
|
49 |
else:
|
50 |
+
# cropped_image = gray[y1:y2, x1:x2]
|
51 |
+
cropped_image = resized_image[y1:y2, x1:x2]
|
52 |
cropped_image = cv2.resize(cropped_image, (640, 640))
|
53 |
cv2.imwrite('odometer_number_image.jpg', cropped_image)
|
54 |
|
|
|
57 |
image_path='odometer_number_image.jpg',
|
58 |
threshold=0.4
|
59 |
)
|
60 |
+
|
61 |
+
display_text = f'Here is the zoomed odometer value: {extracted_digit}'
|
62 |
st.image('odometer_number_image.jpg', caption=f"{display_text}", use_column_width=True)
|
63 |
|
64 |
image = Image.open('odometer_image.jpg')
|