Spaces:
Sleeping
Sleeping
Update ebook2audiobookXTTS/custom_model_ebook2audiobookXTTS_with_link_gradio.py
Browse files
ebook2audiobookXTTS/custom_model_ebook2audiobookXTTS_with_link_gradio.py
CHANGED
|
@@ -21,10 +21,12 @@ from gradio import Progress
|
|
| 21 |
import urllib.request
|
| 22 |
import zipfile
|
| 23 |
|
|
|
|
|
|
|
| 24 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 25 |
print(f"Device selected is: {device}")
|
| 26 |
|
| 27 |
-
nltk.download('punkt') # Make sure to download the necessary models
|
| 28 |
|
| 29 |
|
| 30 |
def download_and_extract_zip(url, extract_to='.'):
|
|
@@ -289,7 +291,7 @@ def create_chapter_labeled_book(ebook_file_path):
|
|
| 289 |
save_chapters_as_text(output_epub)
|
| 290 |
|
| 291 |
# Download the necessary NLTK data (if not already present)
|
| 292 |
-
nltk.download('punkt')
|
| 293 |
|
| 294 |
def process_chapter_files(folder_path, output_csv):
|
| 295 |
with open(output_csv, 'w', newline='', encoding='utf-8') as csvfile:
|
|
|
|
| 21 |
import urllib.request
|
| 22 |
import zipfile
|
| 23 |
|
| 24 |
+
from .. import import_all_files
|
| 25 |
+
|
| 26 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 27 |
print(f"Device selected is: {device}")
|
| 28 |
|
| 29 |
+
#nltk.download('punkt') # Make sure to download the necessary models
|
| 30 |
|
| 31 |
|
| 32 |
def download_and_extract_zip(url, extract_to='.'):
|
|
|
|
| 291 |
save_chapters_as_text(output_epub)
|
| 292 |
|
| 293 |
# Download the necessary NLTK data (if not already present)
|
| 294 |
+
#nltk.download('punkt')
|
| 295 |
|
| 296 |
def process_chapter_files(folder_path, output_csv):
|
| 297 |
with open(output_csv, 'w', newline='', encoding='utf-8') as csvfile:
|