Update utils.py
Browse files
utils.py
CHANGED
@@ -18,10 +18,10 @@ def get_gemini_response(prompt, pdf_content, input):
|
|
18 |
def input_pdf_setup(uploaded_file):
|
19 |
if uploaded_file is not None:
|
20 |
## Convert the PDF to image
|
21 |
-
path = os.path.join('poppler-23.11.0', 'Library', 'bin')
|
22 |
images=pdf2image.convert_from_bytes(
|
23 |
uploaded_file.read(),
|
24 |
-
|
|
|
25 |
)
|
26 |
# first_page=images[0]
|
27 |
pdf_parts = []
|
|
|
18 |
def input_pdf_setup(uploaded_file):
|
19 |
if uploaded_file is not None:
|
20 |
## Convert the PDF to image
|
|
|
21 |
images=pdf2image.convert_from_bytes(
|
22 |
uploaded_file.read(),
|
23 |
+
# poppler_path= os.environ["PATH_POPPLER"]# for windows if resulting error
|
24 |
+
poppler_path= "poppler-23.11.0\Library\\bin"
|
25 |
)
|
26 |
# first_page=images[0]
|
27 |
pdf_parts = []
|