paul hilders commited on
Commit
41478ca
1 Parent(s): 6db570e

Use font Arial

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. arial.ttf +0 -0
app.py CHANGED
@@ -81,7 +81,8 @@ iface = gr.Interface(fn=run_demo,
81
  def add_label_to_img(img, label):
82
  img = ImageOps.expand(img, border=45, fill=(255,255,255))
83
  draw = ImageDraw.Draw(img)
84
- draw.text((0,0), label, align="center", fill=(0, 0, 0))
 
85
 
86
  return img
87
 
 
81
  def add_label_to_img(img, label):
82
  img = ImageOps.expand(img, border=45, fill=(255,255,255))
83
  draw = ImageDraw.Draw(img)
84
+ font = ImageFont.truetype("arial.ttf", 36)
85
+ draw.text((0,0), label, align="center", fill=(0, 0, 0), font=font)
86
 
87
  return img
88
 
arial.ttf ADDED
Binary file (367 kB). View file