milwright commited on
Commit
1bd70fe
·
1 Parent(s): 3dd2ff2

Apply light preprocessing by default (grayscale, denoise, contrast=5) to improve OCR readability

Browse files
Files changed (1) hide show
  1. ui_components.py +3 -3
ui_components.py CHANGED
@@ -131,19 +131,19 @@ def create_sidebar_options():
131
 
132
  # Grayscale conversion
133
  grayscale = st.checkbox("Convert to Grayscale",
134
- value=False,
135
  help="Convert color images to grayscale for better text recognition")
136
 
137
  # Light denoising option
138
  denoise = st.checkbox("Light Denoising",
139
- value=False,
140
  help="Apply gentle denoising to improve text clarity")
141
 
142
  # Contrast adjustment
143
  contrast = st.slider("Contrast Adjustment",
144
  min_value=-20,
145
  max_value=20,
146
- value=0,
147
  step=5,
148
  help="Adjust image contrast (limited range)")
149
 
 
131
 
132
  # Grayscale conversion
133
  grayscale = st.checkbox("Convert to Grayscale",
134
+ value=True,
135
  help="Convert color images to grayscale for better text recognition")
136
 
137
  # Light denoising option
138
  denoise = st.checkbox("Light Denoising",
139
+ value=True,
140
  help="Apply gentle denoising to improve text clarity")
141
 
142
  # Contrast adjustment
143
  contrast = st.slider("Contrast Adjustment",
144
  min_value=-20,
145
  max_value=20,
146
+ value=5,
147
  step=5,
148
  help="Adjust image contrast (limited range)")
149