JothishJJ commited on
Commit
bb05677
Β·
verified Β·
1 Parent(s): e8c20ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
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="efficient-speech/lite-whisper-large-v3-turbo")
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):