Skip to content

Commit 93a6f49

Browse files
committed
GUI example fitz -> pymupdf.
1 parent 2538502 commit 93a6f49

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

GUI/browser-app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
from langchain_community.document_loaders import PyMuPDFLoader
3636

37-
import fitz
37+
import pymupdf
3838
from PIL import Image
3939
import os
4040
import re
@@ -121,7 +121,7 @@ def get_response(history, query, file):
121121

122122

123123
def render_file(file):
124-
doc = fitz.open(file.name)
124+
doc = pymupdf.open(file.name)
125125
page = doc[app.N]
126126
# Render the page as a PNG image with a resolution of 150 DPI
127127
pix = page.get_pixmap(dpi=150)
@@ -136,7 +136,7 @@ def purge_chat_and_render_first(file):
136136
app.count = 0
137137

138138
# Use PyMuPDF to render the first page of the uploaded document
139-
doc = fitz.open(file.name)
139+
doc = pymupdf.open(file.name)
140140
page = doc[0]
141141
# Render the page as a PNG image with a resolution of 150 DPI
142142
pix = page.get_pixmap(dpi=150)

0 commit comments

Comments
 (0)