chore: default to local inference for partition_pdf and partition_image (#222)

* chore: default the url to None for pdf and images

* bump changelog and version
This commit is contained in:
Matt Robinson 2023-02-14 16:16:33 -05:00 committed by GitHub
parent ab542ca3c6
commit a68dc35940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,7 @@
## 0.4.9-dev0 ## 0.4.9-dev1
* Added ingest modules and s3 connector * Added ingest modules and s3 connector
* Default to `url=None` for `partition_pdf` and `partition_image`
## 0.4.8 ## 0.4.8

View File

@ -142,7 +142,7 @@ Examples:
from unstructured.partition.pdf import partition_pdf from unstructured.partition.pdf import partition_pdf
# Returns a List[Element] present in the pages of the parsed pdf document # Returns a List[Element] present in the pages of the parsed pdf document
elements = partition_pdf("example-docs/layout-parser-paper-fast.pdf", url=None) elements = partition_pdf("example-docs/layout-parser-paper-fast.pdf")
``partition_image`` ``partition_image``
@ -159,7 +159,7 @@ Examples:
from unstructured.partition.image import partition_image from unstructured.partition.image import partition_image
# Returns a List[Element] present in the pages of the parsed image document # Returns a List[Element] present in the pages of the parsed image document
elements = partition_image("example-docs/layout-parser-paper-fast.jpg", url=None) elements = partition_image("example-docs/layout-parser-paper-fast.jpg")

View File

@ -1 +1 @@
__version__ = "0.4.9-dev0" # pragma: no cover __version__ = "0.4.9-dev1" # pragma: no cover

View File

@ -7,7 +7,7 @@ from unstructured.partition.pdf import partition_pdf_or_image
def partition_image( def partition_image(
filename: str = "", filename: str = "",
file: Optional[bytes] = None, file: Optional[bytes] = None,
url: Optional[str] = "https://ml.unstructured.io/", url: Optional[str] = None,
template: Optional[str] = None, template: Optional[str] = None,
token: Optional[str] = None, token: Optional[str] = None,
include_page_breaks: bool = False, include_page_breaks: bool = False,

View File

@ -9,7 +9,7 @@ from unstructured.partition.common import normalize_layout_element, document_to_
def partition_pdf( def partition_pdf(
filename: str = "", filename: str = "",
file: Optional[bytes] = None, file: Optional[bytes] = None,
url: Optional[str] = "https://ml.unstructured.io/", url: Optional[str] = None,
template: Optional[str] = None, template: Optional[str] = None,
token: Optional[str] = None, token: Optional[str] = None,
include_page_breaks: bool = False, include_page_breaks: bool = False,