Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,10 +58,6 @@ def extract_weight(img):
|
|
| 58 |
# Preprocess the image for better OCR results
|
| 59 |
processed_img = preprocess_image(img_cv)
|
| 60 |
|
| 61 |
-
# Debug: Show the processed image to verify preprocessing
|
| 62 |
-
debug_img = Image.fromarray(processed_img)
|
| 63 |
-
debug_img.show() # This will open the processed image for debugging purposes
|
| 64 |
-
|
| 65 |
# Configure Tesseract to detect only digits and decimals
|
| 66 |
custom_config = r'--oem 3 --psm 6 -c tessedit_char_whitelist=0123456789.'
|
| 67 |
|
|
|
|
| 58 |
# Preprocess the image for better OCR results
|
| 59 |
processed_img = preprocess_image(img_cv)
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
# Configure Tesseract to detect only digits and decimals
|
| 62 |
custom_config = r'--oem 3 --psm 6 -c tessedit_char_whitelist=0123456789.'
|
| 63 |
|