change pdf generateor layout and titles
Browse files- local/pdf_generator.py +4 -4
local/pdf_generator.py
CHANGED
@@ -59,15 +59,15 @@ class MedicalReport:
|
|
59 |
elements.append(Paragraph(f"Date: {self.date}", styles["BodyText"]))
|
60 |
|
61 |
# Patient name, doctor name, and date
|
62 |
-
elements.append(Paragraph("
|
63 |
|
64 |
elements.append(Paragraph("<br></br>", styles["Normal"]))
|
65 |
elements.append(Paragraph("<br></br>", styles["Normal"]))
|
66 |
-
elements.append(Paragraph(f"<b>
|
67 |
|
68 |
elements.append(Paragraph("<br></br>", styles["Normal"]))
|
69 |
|
70 |
-
elements.append(Paragraph(f"<b>
|
71 |
elements.append(Paragraph("Speech Recognition", styles["Heading3"]))
|
72 |
# Add ref and hyp
|
73 |
elements.append(Paragraph(f"<b>Reference:</b> {self.ref}", styles["Normal"]))
|
@@ -107,7 +107,7 @@ class MedicalReport:
|
|
107 |
# date = "2024-02-12"
|
108 |
# # pitch_plot = "./local/laronix_logo.jpg"
|
109 |
|
110 |
-
# Nat_plot = Naturalness_Plot(4.5).to_image("jpg")
|
111 |
# Int_plot = Intelligibility_Plot(90).to_image("jpg")
|
112 |
# pitch_plot_buffer = io.BytesIO()
|
113 |
# pitch_plot_bytes = draw_spec_db_pitch("JOHN1.wav").savefig(pitch_plot_buffer, format="jpg")
|
|
|
59 |
elements.append(Paragraph(f"Date: {self.date}", styles["BodyText"]))
|
60 |
|
61 |
# Patient name, doctor name, and date
|
62 |
+
elements.append(Paragraph("Session Details", styles["Heading2"]))
|
63 |
|
64 |
elements.append(Paragraph("<br></br>", styles["Normal"]))
|
65 |
elements.append(Paragraph("<br></br>", styles["Normal"]))
|
66 |
+
elements.append(Paragraph(f"<b>Patient Name:</b> {self.patient_name}, <b>\t SLP Name:</b> {self.doctor_name}", styles["Normal"]))
|
67 |
|
68 |
elements.append(Paragraph("<br></br>", styles["Normal"]))
|
69 |
|
70 |
+
elements.append(Paragraph(f"<b>Results</b>", styles["Heading2"]))
|
71 |
elements.append(Paragraph("Speech Recognition", styles["Heading3"]))
|
72 |
# Add ref and hyp
|
73 |
elements.append(Paragraph(f"<b>Reference:</b> {self.ref}", styles["Normal"]))
|
|
|
107 |
# date = "2024-02-12"
|
108 |
# # pitch_plot = "./local/laronix_logo.jpg"
|
109 |
|
110 |
+
#xxxx Nat_plot = Naturalness_Plot(4.5).to_image("jpg")
|
111 |
# Int_plot = Intelligibility_Plot(90).to_image("jpg")
|
112 |
# pitch_plot_buffer = io.BytesIO()
|
113 |
# pitch_plot_bytes = draw_spec_db_pitch("JOHN1.wav").savefig(pitch_plot_buffer, format="jpg")
|