Skip to content
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

Add DJLServing Python client demo #278

Merged
merged 3 commits into from
Nov 21, 2022
Merged

Conversation

xyang16
Copy link
Contributor

@xyang16 xyang16 commented Nov 15, 2022

No description provided.


# Run inference
url = 'http://localhost:8080/predictions/traced_resnet18'
headers = {'Content-Type': 'application/octet-stream'}
with open('/tmp/kitten.jpg', 'rb') as f:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to demo 2 formats. This is the example of binary input.

files={'data': open('kitten.jpg', 'rb')} below demo the multipart format.

@xyang16 xyang16 merged commit fb884df into deepjavalibrary:master Nov 21, 2022
@xyang16 xyang16 deleted the python branch May 2, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants