Skip to content
Snippets Groups Projects
Commit 63cdd960 authored by Vesa Halenius's avatar Vesa Halenius
Browse files

Delete client.py

parent b72aed6a
No related branches found
No related tags found
No related merge requests found
import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
# Send local image file to tensorflow-client
multipart_data = MultipartEncoder(
fields={
# a file upload field
'image': ('image.jpg', open('image.jpg', 'rb'), 'text/plain')
}
)
response = requests.post('http://tensorflow.stop.capstone.utu.fi/api/v1/classifyImage/', data=multipart_data,
headers={'Content-Type': multipart_data.content_type})
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment