Skip to content

Commit

Permalink
fix file data parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusfrost committed Nov 15, 2020
1 parent 8f81def commit c13ee69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if __name__ == '__main__':
# curl -O https://raw.githubusercontent.com/pytorch/serve/master/docs/images/kitten_small.jpg
files = {'upload_file': open('kitten_small.jpg', 'rb')}
files = {'data': open('kitten_small.jpg', 'rb')}
url = 'http://127.0.0.1:8080/predictions/densenet161'
response = requests.post(url, files=files)
print(response.json())

0 comments on commit c13ee69

Please sign in to comment.