LuckRafly commited on
Commit
4b44664
·
verified ·
1 Parent(s): a15a84a

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +1 -1
utils.py CHANGED
@@ -19,7 +19,7 @@ def get_gemini_response(prompt, pdf_content, input):
19
  def input_pdf_setup(uploaded_file):
20
  if uploaded_file is not None:
21
  ## Convert the PDF to image
22
- path = Path("poppler-23.11.0\\Library\\bin")
23
  images=pdf2image.convert_from_bytes(
24
  uploaded_file.read(),
25
  poppler_path= path
 
19
  def input_pdf_setup(uploaded_file):
20
  if uploaded_file is not None:
21
  ## Convert the PDF to image
22
+ path = Path(__file__).resolve().parent / "poppler-23.11.0" / "Library" / "bin"
23
  images=pdf2image.convert_from_bytes(
24
  uploaded_file.read(),
25
  poppler_path= path