ThomasSimonini HF staff commited on
Commit
bca7c2b
·
1 Parent(s): 24dbcca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -346,18 +346,7 @@ def generate_certificate(certificate_model, first_name, last_name):
346
 
347
 
348
  pdf = im.convert('RGB')
349
- test = pdf.save('certificate.pdf').filename
350
- print("PDF: ", test)
351
-
352
- # rgba = im
353
- # rgb = Image.new('RGB', im.size, (255, 255, 255)) # white background
354
- # rgb.paste(rgba, mask=rgba.split()[3]) # 3 is the alpha channel
355
- # pdf_ = rgb.save("certificate.pdf", 'PDF', save_all = True, resolution=100.0)
356
- # pdf__ = im.save("certificate.png")
357
- # print("RGB", rgb)
358
- # print("PDF", pdf_)
359
- # print("PDF", pdf__)
360
- # pdf = pdf_.filename
361
 
362
  return im, pdf
363
 
 
346
 
347
 
348
  pdf = im.convert('RGB')
349
+ pdf.save('certificate.pdf')
 
 
 
 
 
 
 
 
 
 
 
350
 
351
  return im, pdf
352