Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -495,7 +495,7 @@ def process_pdf_tab(pdf_file, max_pages, voice):
|
|
495 |
def process_page_sync(page_num, page_text):
|
496 |
async def run_async_audio(): return await audio_processor.create_audio(page_text, voice)
|
497 |
try: audio_path = asyncio.run(run_async_audio()) # Use asyncio.run in thread
|
498 |
-
|
499 |
with results_lock: audios[page_num] = audio_path
|
500 |
except Exception as page_e: print(f"❌ Err process page {page_num+1}: {page_e}")
|
501 |
|
|
|
495 |
def process_page_sync(page_num, page_text):
|
496 |
async def run_async_audio(): return await audio_processor.create_audio(page_text, voice)
|
497 |
try: audio_path = asyncio.run(run_async_audio()) # Use asyncio.run in thread
|
498 |
+
if audio_path:
|
499 |
with results_lock: audios[page_num] = audio_path
|
500 |
except Exception as page_e: print(f"❌ Err process page {page_num+1}: {page_e}")
|
501 |
|