Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -180,11 +180,11 @@ async def download_file_from_url(url: str, retries: int = 3, delay: float = 2.0)
|
|
| 180 |
return temp_file.name
|
| 181 |
|
| 182 |
except Exception as e:
|
| 183 |
-
print(f"Attempt {attempt} failed for {url}: {e}")
|
| 184 |
if attempt < retries:
|
| 185 |
await asyncio.sleep(delay)
|
| 186 |
|
| 187 |
-
print(f"All {retries} attempts failed for {url}, skipping...")
|
| 188 |
return None
|
| 189 |
|
| 190 |
#-----------------------------------------------------------
|
|
@@ -327,8 +327,8 @@ async def concat_story_audio(story: StoryCreationDTO, base_output: str, final_pa
|
|
| 327 |
sfx_audio = AudioSegment.from_wav(sfx_file_wav)
|
| 328 |
scene_audio = scene_audio.overlay(sfx_audio)
|
| 329 |
# os.remove(sfx_file)
|
| 330 |
-
else:
|
| 331 |
-
print(f"SFX skipped for {scene.location.locationName}")
|
| 332 |
|
| 333 |
# --- Add background music if available ---
|
| 334 |
if scene.bgMusic and scene.bgMusic.musicPath:
|
|
|
|
| 180 |
return temp_file.name
|
| 181 |
|
| 182 |
except Exception as e:
|
| 183 |
+
#print(f"Attempt {attempt} failed for {url}: {e}")
|
| 184 |
if attempt < retries:
|
| 185 |
await asyncio.sleep(delay)
|
| 186 |
|
| 187 |
+
#print(f"All {retries} attempts failed for {url}, skipping...")
|
| 188 |
return None
|
| 189 |
|
| 190 |
#-----------------------------------------------------------
|
|
|
|
| 327 |
sfx_audio = AudioSegment.from_wav(sfx_file_wav)
|
| 328 |
scene_audio = scene_audio.overlay(sfx_audio)
|
| 329 |
# os.remove(sfx_file)
|
| 330 |
+
#else:
|
| 331 |
+
#print(f"SFX skipped for {scene.location.locationName}")
|
| 332 |
|
| 333 |
# --- Add background music if available ---
|
| 334 |
if scene.bgMusic and scene.bgMusic.musicPath:
|