kpal002 commited on
Commit
b9e28b5
1 Parent(s): 6b18a86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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, reasoning_html, output_path):
117
  pdf = PDF()
118
  pdf.add_page()
119
- pdf.set_font("Roboto", 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
- reasoning_text = remove_html_tags(reasoning_html) # Make sure to handle HTML if present
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