-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore/change default split page behavior to true (#118)
* Set the split_pdf_page default to true and run `make client-generate` locally. * Update the readme, add another reference back to our docs * Change some warning logs to info. The user should not be warned about default behavior for non pdf files # Testing Use the client locally and verify that split mode is the default, and that the client behavior is consistent with older versions. * Set up (or activate) your pyenv for the client: `pyenv virtualenv 3.12 unstructured-client; pyenv activate unstructured-client` * Check out this branch and install: `pip install -e .` * Run this sample script in the top level of the client repo. Try different files in `_sample_docs` and verify that the logging and results look acceptable. ``` from unstructured_client import UnstructuredClient from unstructured_client.models import shared, operations import json api_key = "free-api-key" filename = "_sample_docs/layout-parser-paper.pdf" s = UnstructuredClient( api_key_auth=api_key, ) with open(filename, "rb") as f: files=shared.Files( content=f.read(), file_name=filename, ) req = operations.PartitionRequest( shared.PartitionParameters( files=files, strategy=shared.Strategy.AUTO ), ) try: resp = s.general.partition(req) print(json.dumps(resp.elements, indent=4)) except Exception as e: print(e) ```
- Loading branch information
Showing
10 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters