Skip to content

Commit

Permalink
Merge pull request #1052 from icecraft/fix/gradio_project_read
Browse files Browse the repository at this point in the history
fix: use concrete class instead of abstract class
  • Loading branch information
myhloli authored Nov 21, 2024
2 parents ead2e67 + fa3c453 commit 9e4d6a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/gradio_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
from gradio_pdf import PDF
from loguru import logger

from magic_pdf.data.data_reader_writer import DataReader
from magic_pdf.data.data_reader_writer import FileBasedDataReader
from magic_pdf.libs.hash_utils import compute_sha256
from magic_pdf.tools.common import do_parse, prepare_env


def read_fn(path):
disk_rw = DataReader(os.path.dirname(path))
disk_rw = FileBasedDataReader(os.path.dirname(path))
return disk_rw.read(os.path.basename(path))


Expand Down

0 comments on commit 9e4d6a4

Please sign in to comment.