ThomasSimonini HF Staff commited on
Commit
a75e13a
·
verified ·
1 Parent(s): 5bb2ded

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -34,17 +34,7 @@ def add_certificate_entry(username, name):
34
 
35
  # Function to generate certificate PDF
36
  def generate_certificate(name, score):
37
- pdf = FPDF()
38
- pdf.add_page()
39
- pdf.set_font("Arial", size=24)
40
- pdf.cell(200, 20, txt="Certificate of Excellence", ln=True, align="C")
41
- pdf.set_font("Arial", size=16)
42
- pdf.cell(200, 10, txt=f"Presented to {name}", ln=True, align="C")
43
- pdf.cell(200, 10, txt=f"For passing Unit 4 with a score of {score}", ln=True, align="C")
44
- pdf.cell(200, 10, txt=f"Date: {datetime.now().strftime('%Y-%m-%d')}", ln=True, align="C")
45
- pdf_output = io.BytesIO()
46
- pdf.output(pdf_output)
47
- pdf_output.seek(0)
48
  return pdf_output
49
 
50
  # Main function to handle certificate generation
 
34
 
35
  # Function to generate certificate PDF
36
  def generate_certificate(name, score):
37
+ pdf_output = ""
 
 
 
 
 
 
 
 
 
 
38
  return pdf_output
39
 
40
  # Main function to handle certificate generation