nickmuchi commited on
Commit
9a077c8
·
1 Parent(s): 2903417

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -54,7 +54,7 @@ def visualize_prediction(img, output_dict, threshold=0.5, id2label=None):
54
  colors = COLORS * 100
55
  for score, (xmin, ymin, xmax, ymax), label, color in zip(scores, boxes, labels, colors):
56
  ax.add_patch(plt.Rectangle((xmin, ymin), xmax - xmin, ymax - ymin, fill=False, color=color, linewidth=10))
57
- ax.text(xmin, ymin, f"{label}: {score:0.2f}", fontsize=35, bbox=dict(facecolor="yellow", alpha=0.5))
58
  plt.axis("off")
59
  return fig2img(plt.gcf())
60
 
 
54
  colors = COLORS * 100
55
  for score, (xmin, ymin, xmax, ymax), label, color in zip(scores, boxes, labels, colors):
56
  ax.add_patch(plt.Rectangle((xmin, ymin), xmax - xmin, ymax - ymin, fill=False, color=color, linewidth=10))
57
+ ax.text(xmin, ymin, f"{label}: {score:0.2f}", fontsize='large', bbox=dict(facecolor="yellow", alpha=0.5))
58
  plt.axis("off")
59
  return fig2img(plt.gcf())
60