Update app.py
Browse files
app.py
CHANGED
@@ -145,7 +145,12 @@ class PDFTextExtractor:
|
|
145 |
max_tokens=4096
|
146 |
)
|
147 |
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
except Exception as e:
|
151 |
print(f"Error in text extraction: {str(e)}")
|
|
|
145 |
max_tokens=4096
|
146 |
)
|
147 |
|
148 |
+
extracted_texts.append({
|
149 |
+
'page': i + 1,
|
150 |
+
'text': response.choices[0].message.content
|
151 |
+
})
|
152 |
+
|
153 |
+
return extracted_texts
|
154 |
|
155 |
except Exception as e:
|
156 |
print(f"Error in text extraction: {str(e)}")
|