Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -96,10 +96,14 @@ with gr.Blocks(theme=gr.themes.Monochrome(), title="Multicentury HTR Demo") as d
|
|
96 |
# Predict region and line segments
|
97 |
start = time.time()
|
98 |
segment_predictions = segmenter.get_segmentation(image)
|
|
|
99 |
if segment_predictions:
|
100 |
region_plot = plotter.plot_regions(segment_predictions, image)
|
|
|
101 |
line_plot = plotter.plot_lines(segment_predictions, image)
|
|
|
102 |
text_predictions = get_text_predictions(np.array(image), segment_predictions, recognizer)
|
|
|
103 |
text = "\n".join(text_predictions)
|
104 |
end = time.time()
|
105 |
proc_time = end - start
|
|
|
96 |
# Predict region and line segments
|
97 |
start = time.time()
|
98 |
segment_predictions = segmenter.get_segmentation(image)
|
99 |
+
print('segmentation ok')
|
100 |
if segment_predictions:
|
101 |
region_plot = plotter.plot_regions(segment_predictions, image)
|
102 |
+
print('region plot ok')
|
103 |
line_plot = plotter.plot_lines(segment_predictions, image)
|
104 |
+
print('line plot ok')
|
105 |
text_predictions = get_text_predictions(np.array(image), segment_predictions, recognizer)
|
106 |
+
print('text pred ok')
|
107 |
text = "\n".join(text_predictions)
|
108 |
end = time.time()
|
109 |
proc_time = end - start
|