Skip to content

Commit

Permalink
fix pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
FlowDrucka64 committed Jun 20, 2024
2 parents c75624c + 892fdcd commit 7ef046d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions serving-service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def setup():

def load_model():
try:
headers = {"Authorization": auth_header}
response = requests.get(persistence_service_uri, headers=headers, stream=True)
headers = {"x-auth-request-user": auth_header}
response = requests.get(persistence_service_uri+"/model", headers=headers, stream=True)
if response.status_code == 200:
# Use BytesIO for in-memory bytes buffer to store the zip content
zip_file_bytes = io.BytesIO(response.content)
Expand Down Expand Up @@ -117,7 +117,7 @@ def _parse_and_infer(request):

# Load and preprocess image
image = tf.keras.preprocessing.image.load_img(
save_path, target_size=(config["img_height"], config["img_width"])
save_path, target_size=(config["height"], config["width"])
)
img_array = tf.keras.utils.img_to_array(image)
img_array = tf.expand_dims(img_array, 0) # Create a batch
Expand Down

0 comments on commit 7ef046d

Please sign in to comment.