@@ -25,8 +25,8 @@ def pdf_to_images(pdf_path, output_folder):
25
25
substring_to_remove = "Scanned by CamScanner"
26
26
27
27
for i in range (4 ):
28
- pdf_path = f'Files /notes_pdf/module_{ i + 1 } .pdf'
29
- output_folder = f'Files/OutputImages '
28
+ pdf_path = f'Local_Storage /notes_pdf/module_{ i + 1 } .pdf'
29
+ output_folder = f'images/Notes_images '
30
30
31
31
# Convert the PDF to images and save them in the output folder
32
32
image_paths , noImg = pdf_to_images (pdf_path , output_folder )
@@ -37,7 +37,7 @@ def pdf_to_images(pdf_path, output_folder):
37
37
image_contents = " "
38
38
39
39
for j in range (noImg ):
40
- image_path = f'Files/OutputImages /Module_{ i + 1 } /page_{ j + 1 } .jpeg'
40
+ image_path = f'images/Notes_images /Module_{ i + 1 } /page_{ j + 1 } .jpeg'
41
41
with open (image_path , 'rb' ) as image_file :
42
42
content = image_file .read ()
43
43
image = vision .Image (content = content )
@@ -47,7 +47,7 @@ def pdf_to_images(pdf_path, output_folder):
47
47
image_contents += text .replace (substring_to_remove , "" )
48
48
49
49
50
- output_file = f"Files /notes_txt/module{ i + 1 } .txt"
50
+ output_file = f"Local_Storage /notes_txt/module{ i + 1 } .txt"
51
51
52
52
# Write the text content to the output file
53
53
with open (output_file , "w" ) as file :
0 commit comments