mattia-re-learn commited on
Commit
f808930
·
verified ·
1 Parent(s): dfd01ae

Update code/inference.py

Browse files
Files changed (1) hide show
  1. 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 = s3_path[5:]
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: