Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -124,9 +124,13 @@ top_margin = 100
|
|
124 |
def predict(input_path):
|
125 |
image = cv.imread(input_path)
|
126 |
bin_image = preprocess_image(image)
|
|
|
127 |
lines = split_image_into_lines(bin_image)
|
|
|
128 |
improved_text = get_improved_result(lines)
|
|
|
129 |
out_image = put_text(improved_text, font, font_scale, color, thickness, max_width, out_image_width, top_margin)
|
|
|
130 |
return out_img
|
131 |
|
132 |
gradio_app = gr.Interface(
|
|
|
124 |
def predict(input_path):
|
125 |
image = cv.imread(input_path)
|
126 |
bin_image = preprocess_image(image)
|
127 |
+
print("Preprocessing Complete!")
|
128 |
lines = split_image_into_lines(bin_image)
|
129 |
+
print("Splitting complete!")
|
130 |
improved_text = get_improved_result(lines)
|
131 |
+
print("Improvement done!")
|
132 |
out_image = put_text(improved_text, font, font_scale, color, thickness, max_width, out_image_width, top_margin)
|
133 |
+
print("Out image generated!")
|
134 |
return out_img
|
135 |
|
136 |
gradio_app = gr.Interface(
|