Rauhan commited on
Commit
14542aa
·
1 Parent(s): f7a5f70

DEBUG: download

Browse files
Files changed (4) hide show
  1. main.py +59 -48
  2. pyproject.toml +1 -1
  3. requirements.txt +0 -2
  4. uv.lock +24 -66
main.py CHANGED
@@ -1,8 +1,14 @@
 
 
 
 
 
 
 
1
  from src.pipelines.pipeline import Pipeline
2
  from datetime import datetime
3
  import streamlit as st
4
  from io import BytesIO
5
- from fpdf import FPDF
6
  import tempfile
7
  import requests
8
  import time
@@ -41,9 +47,9 @@ st.markdown("""
41
 
42
  # Cache the font download
43
  @st.cache_resource(show_spinner=False)
44
- def get_dejavu_font_path():
45
- FONT_URL = "https://github.com/senotrusov/dejavu-fonts-ttf/raw/refs/heads/master/ttf/DejaVuSans.ttf"
46
- response = requests.get(FONT_URL)
47
  tempFontFile = tempfile.NamedTemporaryFile(delete=False, suffix=".ttf")
48
  tempFontFile.write(response.content)
49
  tempFontFile.close()
@@ -51,35 +57,49 @@ def get_dejavu_font_path():
51
 
52
  # Cache the summary generation
53
  @st.cache_data(show_spinner=False, ttl=3600)
54
- def generate_summary(_pipeline, pdf_bytes):
55
- return pipeline.run(pdf_bytes)
56
 
57
  # Cache the PDF generation
58
  @st.cache_data(show_spinner=False, ttl=3600)
59
- def generate_pdf_bytes(summary, font_path):
60
- pdf = FPDF()
61
- pdf.add_page()
62
- pdf.add_font("DejaVu", "", font_path, uni=True)
63
- pdf.set_font("DejaVu", '', 16)
64
- pdf.cell(200, 10, txt="PDF Summary", ln=True, align='C')
65
- pdf.ln(10)
66
- pdf.set_font("DejaVu", '', 12)
67
- pdf.multi_cell(0, 10, summary)
68
-
69
- pdf_output = BytesIO()
70
- pdf.output(pdf_output)
71
- return pdf_output.getvalue()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  # Sidebar
74
  with st.sidebar:
75
  st.markdown("### Upload PDF")
76
- uploadedFile = st.file_uploader("Choose your PDF file", type=['pdf'])
77
 
78
  if uploadedFile:
79
  pdfDetails = {
80
- 'File Name': uploadedFile.name,
81
- 'File Size': f"{round(len(uploadedFile.getvalue()) / 1024, 2)} KB",
82
- 'Upload Time': datetime.now().strftime("%Y-%m-%d %H:%M:%S")
83
  }
84
 
85
  st.markdown("### PDF Details")
@@ -88,10 +108,7 @@ with st.sidebar:
88
 
89
  # Main content
90
  st.markdown("<h1 class='main-header'>PDF Summarizer</h1>", unsafe_allow_html=True)
91
- st.write("""
92
- This application generates a concise summary from your uploaded PDF document.
93
- Upload a file to get started.
94
- """)
95
 
96
  if uploadedFile:
97
  statusContainer = st.empty()
@@ -102,17 +119,14 @@ if uploadedFile:
102
  statusBox = st.empty()
103
 
104
  try:
105
- # Read PDF
106
  startTime = time.time()
107
  statusBox.info("Reading PDF file...")
108
  pdfBytes = uploadedFile.getvalue()
109
  readDuration = time.time() - startTime
110
  statusBox.success(f"PDF file read successfully ({readDuration:.2f}s)")
111
 
112
- # Generate summary
113
  statusBox.info("Generating summary...")
114
- summaryStartTime = time.time()
115
- summary = generate_summary(pipeline, pdfBytes)
116
  totalTime = time.time() - startTime
117
 
118
  if summary:
@@ -121,25 +135,22 @@ if uploadedFile:
121
  with summaryContainer.container():
122
  st.markdown("<h2 class='summary-header'>Generated Summary</h2>", unsafe_allow_html=True)
123
  st.markdown(summary)
124
-
125
- if st.button("Download Summary as PDF"):
126
- try:
127
- font_path = get_dejavu_font_path()
128
- pdf_bytes = generate_pdf_bytes(summary, font_path)
129
- timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
130
-
131
- st.download_button(
132
- label="Click to Download",
133
- data=pdf_bytes,
134
- file_name=f"summary_{timestamp}.pdf",
135
- mime="application/pdf"
136
- )
137
- except Exception as e:
138
- st.error(f"Error creating PDF: {str(e)}")
139
  else:
140
  statusBox.error("Failed to generate summary. Please try again.")
141
-
142
  except Exception as e:
143
  statusBox.error(f"Error processing PDF: {str(e)}")
144
  else:
145
- st.info("Please upload a PDF file using the sidebar to get started.")
 
1
+ from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
2
+ from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
3
+ from reportlab.pdfbase.ttfonts import TTFont
4
+ from reportlab.pdfbase import pdfmetrics
5
+ from reportlab.lib.pagesizes import A4
6
+ from reportlab.lib.units import inch
7
+
8
  from src.pipelines.pipeline import Pipeline
9
  from datetime import datetime
10
  import streamlit as st
11
  from io import BytesIO
 
12
  import tempfile
13
  import requests
14
  import time
 
47
 
48
  # Cache the font download
49
  @st.cache_resource(show_spinner=False)
50
+ def getDejaVuFontPath():
51
+ fontUrl = "https://github.com/senotrusov/dejavu-fonts-ttf/raw/refs/heads/master/ttf/DejaVuSans.ttf"
52
+ response = requests.get(fontUrl)
53
  tempFontFile = tempfile.NamedTemporaryFile(delete=False, suffix=".ttf")
54
  tempFontFile.write(response.content)
55
  tempFontFile.close()
 
57
 
58
  # Cache the summary generation
59
  @st.cache_data(show_spinner=False, ttl=3600)
60
+ def generateSummary(_pipeline, pdfBytes):
61
+ return pipeline.run(pdfBytes)
62
 
63
  # Cache the PDF generation
64
  @st.cache_data(show_spinner=False, ttl=3600)
65
+ def generatePdfBytes(summary, fontPath):
66
+ buffer = BytesIO()
67
+ doc = SimpleDocTemplate(buffer, pagesize=A4,
68
+ rightMargin=72, leftMargin=72,
69
+ topMargin=72, bottomMargin=72)
70
+
71
+ pdfmetrics.registerFont(TTFont("DejaVu", fontPath))
72
+
73
+ styles = getSampleStyleSheet()
74
+ styles.add(ParagraphStyle(
75
+ name="summaryStyle",
76
+ fontName="DejaVu",
77
+ fontSize=12,
78
+ leading=18,
79
+ spaceAfter=12
80
+ ))
81
+
82
+ story = [
83
+ Paragraph("PDF Summary", styles["Heading1"]),
84
+ Spacer(1, 0.2 * inch),
85
+ Paragraph(summary.replace("\n", "<br/>"), styles["summaryStyle"])
86
+ ]
87
+
88
+ doc.build(story)
89
+ pdfValue = buffer.getvalue()
90
+ buffer.close()
91
+ return pdfValue
92
 
93
  # Sidebar
94
  with st.sidebar:
95
  st.markdown("### Upload PDF")
96
+ uploadedFile = st.file_uploader("Choose your PDF file", type=["pdf"])
97
 
98
  if uploadedFile:
99
  pdfDetails = {
100
+ "File Name": uploadedFile.name,
101
+ "File Size": f"{round(len(uploadedFile.getvalue()) / 1024, 2)} KB",
102
+ "Upload Time": datetime.now().strftime("%Y-%m-%d %H:%M:%S")
103
  }
104
 
105
  st.markdown("### PDF Details")
 
108
 
109
  # Main content
110
  st.markdown("<h1 class='main-header'>PDF Summarizer</h1>", unsafe_allow_html=True)
111
+ st.write("This application generates a concise summary from your uploaded PDF document. Upload a file to get started.")
 
 
 
112
 
113
  if uploadedFile:
114
  statusContainer = st.empty()
 
119
  statusBox = st.empty()
120
 
121
  try:
 
122
  startTime = time.time()
123
  statusBox.info("Reading PDF file...")
124
  pdfBytes = uploadedFile.getvalue()
125
  readDuration = time.time() - startTime
126
  statusBox.success(f"PDF file read successfully ({readDuration:.2f}s)")
127
 
 
128
  statusBox.info("Generating summary...")
129
+ summary = generateSummary(pipeline, pdfBytes)
 
130
  totalTime = time.time() - startTime
131
 
132
  if summary:
 
135
  with summaryContainer.container():
136
  st.markdown("<h2 class='summary-header'>Generated Summary</h2>", unsafe_allow_html=True)
137
  st.markdown(summary)
138
+ try:
139
+ fontPath = getDejaVuFontPath()
140
+ pdfBytesOut = generatePdfBytes(summary, fontPath)
141
+ timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
142
+
143
+ st.download_button(
144
+ label="Download Summary as PDF",
145
+ data=pdfBytesOut,
146
+ file_name=f"summary_{timestamp}.pdf",
147
+ mime="application/pdf"
148
+ )
149
+ except Exception as e:
150
+ st.error(f"Error creating PDF: {str(e)}")
 
 
151
  else:
152
  statusBox.error("Failed to generate summary. Please try again.")
 
153
  except Exception as e:
154
  statusBox.error(f"Error processing PDF: {str(e)}")
155
  else:
156
+ st.info("Please upload a PDF file using the sidebar to get started.")
pyproject.toml CHANGED
@@ -5,7 +5,6 @@ description = "Add your description here"
5
  readme = "README.md"
6
  requires-python = ">=3.10"
7
  dependencies = [
8
- "fpdf2>=2.8.3",
9
  "groq>=0.23.0",
10
  "litellm>=1.67.1",
11
  "loguru>=0.7.3",
@@ -13,5 +12,6 @@ dependencies = [
13
  "pdf2image>=1.17.0",
14
  "python-dotenv>=1.1.0",
15
  "pyyaml>=6.0.2",
 
16
  "streamlit>=1.44.1",
17
  ]
 
5
  readme = "README.md"
6
  requires-python = ">=3.10"
7
  dependencies = [
 
8
  "groq>=0.23.0",
9
  "litellm>=1.67.1",
10
  "loguru>=0.7.3",
 
12
  "pdf2image>=1.17.0",
13
  "python-dotenv>=1.1.0",
14
  "pyyaml>=6.0.2",
15
+ "reportlab>=4.4.0",
16
  "streamlit>=1.44.1",
17
  ]
requirements.txt DELETED
@@ -1,2 +0,0 @@
1
- streamlit>=1.10.0
2
- fpdf>=1.7.2
 
 
 
uv.lock CHANGED
@@ -195,6 +195,15 @@ wheels = [
195
  { url = "https://files.pythonhosted.org/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe", size = 166393 },
196
  ]
197
 
 
 
 
 
 
 
 
 
 
198
  [[package]]
199
  name = "charset-normalizer"
200
  version = "3.4.1"
@@ -277,15 +286,6 @@ wheels = [
277
  { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 },
278
  ]
279
 
280
- [[package]]
281
- name = "defusedxml"
282
- version = "0.7.1"
283
- source = { registry = "https://pypi.org/simple" }
284
- sdist = { url = "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69", size = 75520 }
285
- wheels = [
286
- { url = "https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61", size = 25604 },
287
- ]
288
-
289
  [[package]]
290
  name = "distro"
291
  version = "1.9.0"
@@ -313,61 +313,6 @@ wheels = [
313
  { url = "https://files.pythonhosted.org/packages/4d/36/2a115987e2d8c300a974597416d9de88f2444426de9571f4b59b2cca3acc/filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de", size = 16215 },
314
  ]
315
 
316
- [[package]]
317
- name = "fonttools"
318
- version = "4.57.0"
319
- source = { registry = "https://pypi.org/simple" }
320
- sdist = { url = "https://files.pythonhosted.org/packages/03/2d/a9a0b6e3a0cf6bd502e64fc16d894269011930cabfc89aee20d1635b1441/fonttools-4.57.0.tar.gz", hash = "sha256:727ece10e065be2f9dd239d15dd5d60a66e17eac11aea47d447f9f03fdbc42de", size = 3492448 }
321
- wheels = [
322
- { url = "https://files.pythonhosted.org/packages/db/17/3ddfd1881878b3f856065130bb603f5922e81ae8a4eb53bce0ea78f765a8/fonttools-4.57.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:babe8d1eb059a53e560e7bf29f8e8f4accc8b6cfb9b5fd10e485bde77e71ef41", size = 2756260 },
323
- { url = "https://files.pythonhosted.org/packages/26/2b/6957890c52c030b0bf9e0add53e5badab4682c6ff024fac9a332bb2ae063/fonttools-4.57.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:81aa97669cd726349eb7bd43ca540cf418b279ee3caba5e2e295fb4e8f841c02", size = 2284691 },
324
- { url = "https://files.pythonhosted.org/packages/cc/8e/c043b4081774e5eb06a834cedfdb7d432b4935bc8c4acf27207bdc34dfc4/fonttools-4.57.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0e9618630edd1910ad4f07f60d77c184b2f572c8ee43305ea3265675cbbfe7e", size = 4566077 },
325
- { url = "https://files.pythonhosted.org/packages/59/bc/e16ae5d9eee6c70830ce11d1e0b23d6018ddfeb28025fda092cae7889c8b/fonttools-4.57.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:34687a5d21f1d688d7d8d416cb4c5b9c87fca8a1797ec0d74b9fdebfa55c09ab", size = 4608729 },
326
- { url = "https://files.pythonhosted.org/packages/25/13/e557bf10bb38e4e4c436d3a9627aadf691bc7392ae460910447fda5fad2b/fonttools-4.57.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:69ab81b66ebaa8d430ba56c7a5f9abe0183afefd3a2d6e483060343398b13fb1", size = 4759646 },
327
- { url = "https://files.pythonhosted.org/packages/bc/c9/5e2952214d4a8e31026bf80beb18187199b7001e60e99a6ce19773249124/fonttools-4.57.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d639397de852f2ccfb3134b152c741406752640a266d9c1365b0f23d7b88077f", size = 4941652 },
328
- { url = "https://files.pythonhosted.org/packages/df/04/e80242b3d9ec91a1f785d949edc277a13ecfdcfae744de4b170df9ed77d8/fonttools-4.57.0-cp310-cp310-win32.whl", hash = "sha256:cc066cb98b912f525ae901a24cd381a656f024f76203bc85f78fcc9e66ae5aec", size = 2159432 },
329
- { url = "https://files.pythonhosted.org/packages/33/ba/e858cdca275daf16e03c0362aa43734ea71104c3b356b2100b98543dba1b/fonttools-4.57.0-cp310-cp310-win_amd64.whl", hash = "sha256:7a64edd3ff6a7f711a15bd70b4458611fb240176ec11ad8845ccbab4fe6745db", size = 2203869 },
330
- { url = "https://files.pythonhosted.org/packages/81/1f/e67c99aa3c6d3d2f93d956627e62a57ae0d35dc42f26611ea2a91053f6d6/fonttools-4.57.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3871349303bdec958360eedb619169a779956503ffb4543bb3e6211e09b647c4", size = 2757392 },
331
- { url = "https://files.pythonhosted.org/packages/aa/f1/f75770d0ddc67db504850898d96d75adde238c35313409bfcd8db4e4a5fe/fonttools-4.57.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c59375e85126b15a90fcba3443eaac58f3073ba091f02410eaa286da9ad80ed8", size = 2285609 },
332
- { url = "https://files.pythonhosted.org/packages/f5/d3/bc34e4953cb204bae0c50b527307dce559b810e624a733351a654cfc318e/fonttools-4.57.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:967b65232e104f4b0f6370a62eb33089e00024f2ce143aecbf9755649421c683", size = 4873292 },
333
- { url = "https://files.pythonhosted.org/packages/41/b8/d5933559303a4ab18c799105f4c91ee0318cc95db4a2a09e300116625e7a/fonttools-4.57.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39acf68abdfc74e19de7485f8f7396fa4d2418efea239b7061d6ed6a2510c746", size = 4902503 },
334
- { url = "https://files.pythonhosted.org/packages/32/13/acb36bfaa316f481153ce78de1fa3926a8bad42162caa3b049e1afe2408b/fonttools-4.57.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9d077f909f2343daf4495ba22bb0e23b62886e8ec7c109ee8234bdbd678cf344", size = 5077351 },
335
- { url = "https://files.pythonhosted.org/packages/b5/23/6d383a2ca83b7516d73975d8cca9d81a01acdcaa5e4db8579e4f3de78518/fonttools-4.57.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:46370ac47a1e91895d40e9ad48effbe8e9d9db1a4b80888095bc00e7beaa042f", size = 5275067 },
336
- { url = "https://files.pythonhosted.org/packages/bc/ca/31b8919c6da0198d5d522f1d26c980201378c087bdd733a359a1e7485769/fonttools-4.57.0-cp311-cp311-win32.whl", hash = "sha256:ca2aed95855506b7ae94e8f1f6217b7673c929e4f4f1217bcaa236253055cb36", size = 2158263 },
337
- { url = "https://files.pythonhosted.org/packages/13/4c/de2612ea2216eb45cfc8eb91a8501615dd87716feaf5f8fb65cbca576289/fonttools-4.57.0-cp311-cp311-win_amd64.whl", hash = "sha256:17168a4670bbe3775f3f3f72d23ee786bd965395381dfbb70111e25e81505b9d", size = 2204968 },
338
- { url = "https://files.pythonhosted.org/packages/cb/98/d4bc42d43392982eecaaca117d79845734d675219680cd43070bb001bc1f/fonttools-4.57.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:889e45e976c74abc7256d3064aa7c1295aa283c6bb19810b9f8b604dfe5c7f31", size = 2751824 },
339
- { url = "https://files.pythonhosted.org/packages/1a/62/7168030eeca3742fecf45f31e63b5ef48969fa230a672216b805f1d61548/fonttools-4.57.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:0425c2e052a5f1516c94e5855dbda706ae5a768631e9fcc34e57d074d1b65b92", size = 2283072 },
340
- { url = "https://files.pythonhosted.org/packages/5d/82/121a26d9646f0986ddb35fbbaf58ef791c25b59ecb63ffea2aab0099044f/fonttools-4.57.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44c26a311be2ac130f40a96769264809d3b0cb297518669db437d1cc82974888", size = 4788020 },
341
- { url = "https://files.pythonhosted.org/packages/5b/26/e0f2fb662e022d565bbe280a3cfe6dafdaabf58889ff86fdef2d31ff1dde/fonttools-4.57.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:84c41ba992df5b8d680b89fd84c6a1f2aca2b9f1ae8a67400c8930cd4ea115f6", size = 4859096 },
342
- { url = "https://files.pythonhosted.org/packages/9e/44/9075e323347b1891cdece4b3f10a3b84a8f4c42a7684077429d9ce842056/fonttools-4.57.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ea1e9e43ca56b0c12440a7c689b1350066595bebcaa83baad05b8b2675129d98", size = 4964356 },
343
- { url = "https://files.pythonhosted.org/packages/48/28/caa8df32743462fb966be6de6a79d7f30393859636d7732e82efa09fbbb4/fonttools-4.57.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:84fd56c78d431606332a0627c16e2a63d243d0d8b05521257d77c6529abe14d8", size = 5226546 },
344
- { url = "https://files.pythonhosted.org/packages/f6/46/95ab0f0d2e33c5b1a4fc1c0efe5e286ba9359602c0a9907adb1faca44175/fonttools-4.57.0-cp312-cp312-win32.whl", hash = "sha256:f4376819c1c778d59e0a31db5dc6ede854e9edf28bbfa5b756604727f7f800ac", size = 2146776 },
345
- { url = "https://files.pythonhosted.org/packages/06/5d/1be5424bb305880e1113631f49a55ea7c7da3a5fe02608ca7c16a03a21da/fonttools-4.57.0-cp312-cp312-win_amd64.whl", hash = "sha256:57e30241524879ea10cdf79c737037221f77cc126a8cdc8ff2c94d4a522504b9", size = 2193956 },
346
- { url = "https://files.pythonhosted.org/packages/e9/2f/11439f3af51e4bb75ac9598c29f8601aa501902dcedf034bdc41f47dd799/fonttools-4.57.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:408ce299696012d503b714778d89aa476f032414ae57e57b42e4b92363e0b8ef", size = 2739175 },
347
- { url = "https://files.pythonhosted.org/packages/25/52/677b55a4c0972dc3820c8dba20a29c358197a78229daa2ea219fdb19e5d5/fonttools-4.57.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:bbceffc80aa02d9e8b99f2a7491ed8c4a783b2fc4020119dc405ca14fb5c758c", size = 2276583 },
348
- { url = "https://files.pythonhosted.org/packages/64/79/184555f8fa77b827b9460a4acdbbc0b5952bb6915332b84c615c3a236826/fonttools-4.57.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f022601f3ee9e1f6658ed6d184ce27fa5216cee5b82d279e0f0bde5deebece72", size = 4766437 },
349
- { url = "https://files.pythonhosted.org/packages/f8/ad/c25116352f456c0d1287545a7aa24e98987b6d99c5b0456c4bd14321f20f/fonttools-4.57.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4dea5893b58d4637ffa925536462ba626f8a1b9ffbe2f5c272cdf2c6ebadb817", size = 4838431 },
350
- { url = "https://files.pythonhosted.org/packages/53/ae/398b2a833897297797a44f519c9af911c2136eb7aa27d3f1352c6d1129fa/fonttools-4.57.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dff02c5c8423a657c550b48231d0a48d7e2b2e131088e55983cfe74ccc2c7cc9", size = 4951011 },
351
- { url = "https://files.pythonhosted.org/packages/b7/5d/7cb31c4bc9ffb9a2bbe8b08f8f53bad94aeb158efad75da645b40b62cb73/fonttools-4.57.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:767604f244dc17c68d3e2dbf98e038d11a18abc078f2d0f84b6c24571d9c0b13", size = 5205679 },
352
- { url = "https://files.pythonhosted.org/packages/4c/e4/6934513ec2c4d3d69ca1bc3bd34d5c69dafcbf68c15388dd3bb062daf345/fonttools-4.57.0-cp313-cp313-win32.whl", hash = "sha256:8e2e12d0d862f43d51e5afb8b9751c77e6bec7d2dc00aad80641364e9df5b199", size = 2144833 },
353
- { url = "https://files.pythonhosted.org/packages/c4/0d/2177b7fdd23d017bcfb702fd41e47d4573766b9114da2fddbac20dcc4957/fonttools-4.57.0-cp313-cp313-win_amd64.whl", hash = "sha256:f1d6bc9c23356908db712d282acb3eebd4ae5ec6d8b696aa40342b1d84f8e9e3", size = 2190799 },
354
- { url = "https://files.pythonhosted.org/packages/90/27/45f8957c3132917f91aaa56b700bcfc2396be1253f685bd5c68529b6f610/fonttools-4.57.0-py3-none-any.whl", hash = "sha256:3122c604a675513c68bd24c6a8f9091f1c2376d18e8f5fe5a101746c81b3e98f", size = 1093605 },
355
- ]
356
-
357
- [[package]]
358
- name = "fpdf2"
359
- version = "2.8.3"
360
- source = { registry = "https://pypi.org/simple" }
361
- dependencies = [
362
- { name = "defusedxml" },
363
- { name = "fonttools" },
364
- { name = "pillow" },
365
- ]
366
- sdist = { url = "https://files.pythonhosted.org/packages/ea/a2/6464c0406365d50bcf000a72c6ede7b6633f08ad8bccdc1553265bb15ccf/fpdf2-2.8.3.tar.gz", hash = "sha256:494dc0bd935271c9ce16fb3a47c98b6f59b8d160cd519c2d3a7ed243c3852456", size = 278704 }
367
- wheels = [
368
- { url = "https://files.pythonhosted.org/packages/ef/0d/a79fe9d1c5fa165a940c7a7907d30a5b5f88d14d82dca0afe73618f4b07a/fpdf2-2.8.3-py2.py3-none-any.whl", hash = "sha256:0529d7bf1c46e7031768f442e7def37545b619b1bcd34e9c540de3d866f61550", size = 245701 },
369
- ]
370
-
371
  [[package]]
372
  name = "frozenlist"
373
  version = "1.6.0"
@@ -1040,7 +985,6 @@ name = "pdfsummarizer"
1040
  version = "0.1.0"
1041
  source = { virtual = "." }
1042
  dependencies = [
1043
- { name = "fpdf2" },
1044
  { name = "groq" },
1045
  { name = "litellm" },
1046
  { name = "loguru" },
@@ -1048,12 +992,12 @@ dependencies = [
1048
  { name = "pdf2image" },
1049
  { name = "python-dotenv" },
1050
  { name = "pyyaml" },
 
1051
  { name = "streamlit" },
1052
  ]
1053
 
1054
  [package.metadata]
1055
  requires-dist = [
1056
- { name = "fpdf2", specifier = ">=2.8.3" },
1057
  { name = "groq", specifier = ">=0.23.0" },
1058
  { name = "litellm", specifier = ">=1.67.1" },
1059
  { name = "loguru", specifier = ">=0.7.3" },
@@ -1061,6 +1005,7 @@ requires-dist = [
1061
  { name = "pdf2image", specifier = ">=1.17.0" },
1062
  { name = "python-dotenv", specifier = ">=1.1.0" },
1063
  { name = "pyyaml", specifier = ">=6.0.2" },
 
1064
  { name = "streamlit", specifier = ">=1.44.1" },
1065
  ]
1066
 
@@ -1558,6 +1503,19 @@ wheels = [
1558
  { url = "https://files.pythonhosted.org/packages/45/94/bc295babb3062a731f52621cdc992d123111282e291abaf23faa413443ea/regex-2024.11.6-cp313-cp313-win_amd64.whl", hash = "sha256:2b3361af3198667e99927da8b84c1b010752fa4b1115ee30beaa332cabc3ef1a", size = 273545 },
1559
  ]
1560
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1561
  [[package]]
1562
  name = "requests"
1563
  version = "2.32.3"
 
195
  { url = "https://files.pythonhosted.org/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe", size = 166393 },
196
  ]
197
 
198
+ [[package]]
199
+ name = "chardet"
200
+ version = "5.2.0"
201
+ source = { registry = "https://pypi.org/simple" }
202
+ sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7", size = 2069618 }
203
+ wheels = [
204
+ { url = "https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970", size = 199385 },
205
+ ]
206
+
207
  [[package]]
208
  name = "charset-normalizer"
209
  version = "3.4.1"
 
286
  { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 },
287
  ]
288
 
 
 
 
 
 
 
 
 
 
289
  [[package]]
290
  name = "distro"
291
  version = "1.9.0"
 
313
  { url = "https://files.pythonhosted.org/packages/4d/36/2a115987e2d8c300a974597416d9de88f2444426de9571f4b59b2cca3acc/filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de", size = 16215 },
314
  ]
315
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  [[package]]
317
  name = "frozenlist"
318
  version = "1.6.0"
 
985
  version = "0.1.0"
986
  source = { virtual = "." }
987
  dependencies = [
 
988
  { name = "groq" },
989
  { name = "litellm" },
990
  { name = "loguru" },
 
992
  { name = "pdf2image" },
993
  { name = "python-dotenv" },
994
  { name = "pyyaml" },
995
+ { name = "reportlab" },
996
  { name = "streamlit" },
997
  ]
998
 
999
  [package.metadata]
1000
  requires-dist = [
 
1001
  { name = "groq", specifier = ">=0.23.0" },
1002
  { name = "litellm", specifier = ">=1.67.1" },
1003
  { name = "loguru", specifier = ">=0.7.3" },
 
1005
  { name = "pdf2image", specifier = ">=1.17.0" },
1006
  { name = "python-dotenv", specifier = ">=1.1.0" },
1007
  { name = "pyyaml", specifier = ">=6.0.2" },
1008
+ { name = "reportlab", specifier = ">=4.4.0" },
1009
  { name = "streamlit", specifier = ">=1.44.1" },
1010
  ]
1011
 
 
1503
  { url = "https://files.pythonhosted.org/packages/45/94/bc295babb3062a731f52621cdc992d123111282e291abaf23faa413443ea/regex-2024.11.6-cp313-cp313-win_amd64.whl", hash = "sha256:2b3361af3198667e99927da8b84c1b010752fa4b1115ee30beaa332cabc3ef1a", size = 273545 },
1504
  ]
1505
 
1506
+ [[package]]
1507
+ name = "reportlab"
1508
+ version = "4.4.0"
1509
+ source = { registry = "https://pypi.org/simple" }
1510
+ dependencies = [
1511
+ { name = "chardet" },
1512
+ { name = "pillow" },
1513
+ ]
1514
+ sdist = { url = "https://files.pythonhosted.org/packages/88/69/291a56d8bb177017e6e5421c34baa51b2e9017434c0ca1822e5007e45a26/reportlab-4.4.0.tar.gz", hash = "sha256:a64d85513910e246c21dc97ccc3c9054a1d44370bf8fc1fab80af937814354d5", size = 3597413 }
1515
+ wheels = [
1516
+ { url = "https://files.pythonhosted.org/packages/52/15/4702e132ae36beb8daf3e20a92f166451148c4a89650cc9d3f19b3c66714/reportlab-4.4.0-py3-none-any.whl", hash = "sha256:0a993f1d4a765fcbdf4e26adc96b3351004ebf4d27583340595ba7edafebec32", size = 1953103 },
1517
+ ]
1518
+
1519
  [[package]]
1520
  name = "requests"
1521
  version = "2.32.3"