StormblessedKal commited on
Commit
1887d9b
1 Parent(s): 64da876

fix bucket name

Browse files
Files changed (1) hide show
  1. src/predict.py +2 -1
src/predict.py CHANGED
@@ -148,11 +148,12 @@ class Predictor:
148
 
149
  def createvoice(self,s3_url,audio_base_64,cut_audio,process_audio):
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)
 
148
 
149
  def createvoice(self,s3_url,audio_base_64,cut_audio,process_audio):
150
  file_bytes = None
151
+ bucket_name = self.bucket_name
152
  if s3_url:
153
  parsed_url = urlparse(s3_url)
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)