ThomasSimonini HF staff commited on
Commit
dbd1567
1 Parent(s): 0e84131

Update app.py

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