StormblessedKal commited on
Commit
af4fd1d
1 Parent(s): af9920b

fix bucketname

Browse files
Files changed (1) hide show
  1. src/predict.py +1 -2
src/predict.py CHANGED
@@ -150,10 +150,9 @@ class Predictor:
150
  file_bytes = None
151
  if s3_url:
152
  parsed_url = urlparse(s3_url)
153
- bucket_name = parsed_url.netloc
154
  s3_key = parsed_url.path.lstrip('/')
155
  local_filename = f"{uuid.uuid4()}"
156
- self.download_file_from_s3(bucket_name, s3_key, local_filename)
157
  with open(local_filename, 'rb') as file:
158
  file_bytes = file.read()
159
  os.remove(local_filename)
 
150
  file_bytes = None
151
  if s3_url:
152
  parsed_url = urlparse(s3_url)
 
153
  s3_key = parsed_url.path.lstrip('/')
154
  local_filename = f"{uuid.uuid4()}"
155
+ self.download_file_from_s3(self.bucket_name, s3_key, local_filename)
156
  with open(local_filename, 'rb') as file:
157
  file_bytes = file.read()
158
  os.remove(local_filename)