Spaces:
Build error
Build error
Fix bugs
Browse files
app.py
CHANGED
@@ -211,7 +211,7 @@ def visualize_ocr(pil_img, ocr_result):
|
|
211 |
text = result['text']
|
212 |
rect = patches.Rectangle(bbox[:2], bbox[2]-bbox[0], bbox[3]-bbox[1], linewidth=2, edgecolor='red', facecolor='none', linestyle="-")
|
213 |
ax.add_patch(rect)
|
214 |
-
ax.text(bbox[0], bbox[3], text, horizontalalignment='left', verticalalignment='bottom',
|
215 |
|
216 |
plt.xticks([], [])
|
217 |
plt.yticks([], [])
|
|
|
211 |
text = result['text']
|
212 |
rect = patches.Rectangle(bbox[:2], bbox[2]-bbox[0], bbox[3]-bbox[1], linewidth=2, edgecolor='red', facecolor='none', linestyle="-")
|
213 |
ax.add_patch(rect)
|
214 |
+
ax.text(bbox[0], bbox[3], text, horizontalalignment='left', verticalalignment='bottom', color='blue', fontsize=10)
|
215 |
|
216 |
plt.xticks([], [])
|
217 |
plt.yticks([], [])
|