Skip to content

Update requirements.txt #584

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added _static/sample_file.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions intermediate_source/flask_rest_api_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def transform_image(image_bytes):
# and returns a tensor. To test the above method, read an image file in
# bytes mode and see if you get a tensor back:

with open('sample_file.jpeg', 'rb') as f:
with open('./_static/sample_file.jpeg', 'rb') as f:
image_bytes = f.read()
tensor = transform_image(image_bytes=image_bytes)
print(tensor)
Expand Down Expand Up @@ -193,7 +193,7 @@ def get_prediction(image_bytes):
# We will test our above method:


with open('sample_file.jpeg', 'rb') as f:
with open('./_static/sample_file.jpeg', 'rb') as f:
image_bytes = f.read()
print(get_prediction(image_bytes=image_bytes))

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ numpy
matplotlib
torch
torchvision
flask
PyHamcrest
bs4
awscli==1.16.35
Expand Down