Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,13 @@ from PyPDF2 import PdfReader
|
|
4 |
from ebooklib import epub
|
5 |
from bs4 import BeautifulSoup
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
# Load the VITS model from Hugging Face
|
8 |
-
text_to_speech = pipeline("text-to-speech", model=
|
9 |
|
10 |
# Function to extract text from PDF
|
11 |
def extract_pdf_text(file):
|
|
|
4 |
from ebooklib import epub
|
5 |
from bs4 import BeautifulSoup
|
6 |
|
7 |
+
model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
8 |
+
"efficient-speech/lite-whisper-large-v3-turbo",
|
9 |
+
trust_remote_code=True
|
10 |
+
)
|
11 |
+
|
12 |
# Load the VITS model from Hugging Face
|
13 |
+
text_to_speech = pipeline("text-to-speech", model=model)
|
14 |
|
15 |
# Function to extract text from PDF
|
16 |
def extract_pdf_text(file):
|