Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -113,15 +113,14 @@ class PDF(FPDF):
|
|
113 |
self.set_font('Roboto', 'I', 8)
|
114 |
self.cell(0, 10, f'Page {self.page_no()}', 0, 0, 'C')
|
115 |
|
116 |
-
def create_pdf_report(title, author_info, score,
|
117 |
pdf = PDF()
|
118 |
pdf.add_page()
|
119 |
-
pdf.set_font("
|
120 |
pdf.cell(0, 10, f"Title: {title}", 0, 1)
|
121 |
pdf.cell(0, 10, f"Author Information: {author_info}", 0, 1)
|
122 |
pdf.cell(0, 10, f"Score: {score}", 0, 1)
|
123 |
-
|
124 |
-
pdf.multi_cell(0, 10, f"Reasoning: \n{reasoning_text}")
|
125 |
pdf.output(output_path)
|
126 |
|
127 |
|
|
|
113 |
self.set_font('Roboto', 'I', 8)
|
114 |
self.cell(0, 10, f'Page {self.page_no()}', 0, 0, 'C')
|
115 |
|
116 |
+
def create_pdf_report(title, author_info, score, reasoning_text, output_path):
|
117 |
pdf = PDF()
|
118 |
pdf.add_page()
|
119 |
+
pdf.set_font("Arial", size=12)
|
120 |
pdf.cell(0, 10, f"Title: {title}", 0, 1)
|
121 |
pdf.cell(0, 10, f"Author Information: {author_info}", 0, 1)
|
122 |
pdf.cell(0, 10, f"Score: {score}", 0, 1)
|
123 |
+
pdf.multi_cell(0, 10, f"Reasoning:\n{reasoning_text}")
|
|
|
124 |
pdf.output(output_path)
|
125 |
|
126 |
|