ThomasSimonini HF staff commited on
Commit
69d75a6
·
1 Parent(s): c7e38ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -346,7 +346,8 @@ def generate_certificate(certificate_model, first_name, last_name):
346
  rgba = im
347
  rgb = Image.new('RGB', im.size, (255, 255, 255)) # white background
348
  rgb.paste(rgba, mask=rgba.split()[3]) # 3 is the alpha channel
349
- pdf = rgb.save("certificate.pdf", 'PDF', resolution=100.0)
 
350
 
351
  return im, pdf
352
 
 
346
  rgba = im
347
  rgb = Image.new('RGB', im.size, (255, 255, 255)) # white background
348
  rgb.paste(rgba, mask=rgba.split()[3]) # 3 is the alpha channel
349
+ pdf_ = rgb.save("certificate.pdf", 'PDF', resolution=100.0)
350
+ pdf = pdf_.filename
351
 
352
  return im, pdf
353