Skip to content

Commit

Permalink
🚧 fix(wip): python3.12 imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mxchinegod committed Jul 8, 2024
1 parent 2b6b220 commit cad5bcb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "llm_tractor_beam"
version = "0.1.0"
version = "0.1.1"
description = "An embedding model toolkit; fine-tune SOTA LLMs on knowledge bases rapidly."
readme = "dynamic"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='llm_tractor_beam',
version='0.1.0',
version='0.1.1',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
install_requires=[
Expand Down
12 changes: 3 additions & 9 deletions tractor_beam/utils/file_handlers.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import xml.etree.ElementTree as ET
from bs4 import BeautifulSoup
import PyPDF2, chardet
from pathlib import Path
from tractor_beam.utils.globals import _f

from bs4 import BeautifulSoup
import xml.etree.ElementTree as ET
import chardet
from tractor_beam.utils.globals import _f

from marker import convert as marker
from marker.convert import convert_single_pdf
from marker.models import load_all_models
from marker import output

Expand All @@ -21,7 +15,7 @@ def load_models(self):

async def export_to_markdown(self, _dir, output_filepath, model_lst):
try:
full_text, doc_images, out_meta = marker.convert_single_pdf(self.filepath, model_lst=model_lst)
full_text, doc_images, out_meta = convert_single_pdf(self.filepath, model_lst=model_lst)
result = output.save_markdown(_dir, output_filepath.split('/')[-1], full_text, doc_images, out_meta)
return result
except Exception as e:
Expand Down

0 comments on commit cad5bcb

Please sign in to comment.