-
Notifications
You must be signed in to change notification settings - Fork 6
✨ add support for split utility #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
2179d3a
:sparkles: add support for split
sebastianMindee eeecd82
fix typo in import
sebastianMindee f95a200
fix again
sebastianMindee 272c66b
fix issues
sebastianMindee c434076
fix tests
sebastianMindee 56b60c2
add unit test
sebastianMindee 498a5af
fix forgor :skull:
sebastianMindee a0d6cbf
fix broken syntax for 3.8
sebastianMindee 1957604
fix test
sebastianMindee a63ea0a
rename client methods & deprecate old ones
sebastianMindee 7c23503
move model param logic to their own classes
sebastianMindee 30a6a75
add full support for split
sebastianMindee 6c97e7a
revise entire endpoint slug generation system & refactor input parame…
sebastianMindee 45af404
fix display & test
sebastianMindee 52a5dd6
fix name
sebastianMindee 1d46323
add missing name
sebastianMindee b704ca6
refacto into new syntax
sebastianMindee e6cf806
fix stupid pycharm messing with random strings
sebastianMindee cc128a5
preemptively upgrade split syntax to account for future server evolut…
sebastianMindee 6c4b6d4
fix tests
sebastianMindee 61ce795
update data
sebastianMindee c8f10b0
update syntaxes + add code sample
sebastianMindee 584fb83
update test syntax
sebastianMindee f13da05
fix CI
sebastianMindee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| from mindee import ClientV2, SplitParameters, SplitResponse, PathInput | ||
|
|
||
| input_path = "/path/to/the/file.ext" | ||
| api_key = "MY_API_KEY" | ||
| model_id = "MY_SPLIT_MODEL_ID" | ||
|
|
||
| # Init a new client | ||
| mindee_client = ClientV2(api_key) | ||
|
|
||
| # Set inference parameters | ||
| params = SplitParameters( | ||
| # ID of the model, required. | ||
| model_id=model_id, | ||
| ) | ||
|
|
||
| # Load a file from disk | ||
| input_source = PathInput(input_path) | ||
|
|
||
| # Send for processing | ||
| response = mindee_client.enqueue_and_get_result( | ||
| SplitResponse, | ||
| input_source, | ||
| params, | ||
| ) | ||
|
|
||
| # Print a brief summary of the parsed data | ||
| print(response.inference) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.