Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -168,17 +168,13 @@ def list_s3_files():
|
|
168 |
if check_if_exist(S3_BUCKET_NAME, s3audio):
|
169 |
print('Audio %s already exists!' % s3audio)
|
170 |
else:
|
171 |
-
response = s3_client.
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
print('Has titulo, ready to create Audio!')
|
177 |
-
print('Start creating audio.. %s ' % s3audio)
|
178 |
-
title = metadata['titulo']
|
179 |
-
generateAudio(title, filename, AWS_ACCESS_KEY_ID)
|
180 |
else:
|
181 |
-
print('There is NOT
|
182 |
|
183 |
sleep(500/1000)
|
184 |
|
|
|
168 |
if check_if_exist(S3_BUCKET_NAME, s3audio):
|
169 |
print('Audio %s already exists!' % s3audio)
|
170 |
else:
|
171 |
+
response = s3_client.get_object(Bucket=bucket_name, Key=key)
|
172 |
+
content = response['Body'].read().decode('utf-8')
|
173 |
+
|
174 |
+
if len(content) > 0:
|
175 |
+
generateAudio(content, filename, AWS_ACCESS_KEY_ID)
|
|
|
|
|
|
|
|
|
176 |
else:
|
177 |
+
print('There is NOT content, skipping..')
|
178 |
|
179 |
sleep(500/1000)
|
180 |
|