Update code/inference.py
Browse files- code/inference.py +1 -1
code/inference.py
CHANGED
@@ -72,7 +72,7 @@ def predict_fn(data, model_and_tokenizer):
|
|
72 |
image = Image.open(BytesIO(response.content)).convert("RGB")
|
73 |
elif image_file.startswith("s3://"):
|
74 |
s3 = boto3.client("s3")
|
75 |
-
s3_path =
|
76 |
bucket = s3_path.split('/')[0]
|
77 |
s3_key = '/'.join(s3_path.split('/')[1:])
|
78 |
with tempfile.NamedTemporaryFile() as temp_file:
|
|
|
72 |
image = Image.open(BytesIO(response.content)).convert("RGB")
|
73 |
elif image_file.startswith("s3://"):
|
74 |
s3 = boto3.client("s3")
|
75 |
+
s3_path = image_file[5:]
|
76 |
bucket = s3_path.split('/')[0]
|
77 |
s3_key = '/'.join(s3_path.split('/')[1:])
|
78 |
with tempfile.NamedTemporaryFile() as temp_file:
|