Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -59,6 +59,7 @@ model = SentenceTransformerEmbeddings(model_name='paraphrase-MiniLM-L6-v2')
|
|
59 |
summarization_model_name = "suriya7/bart-finetuned-text-summarization"
|
60 |
summarization_model = AutoModelForSeq2SeqLM.from_pretrained(summarization_model_name)
|
61 |
summarization_tokenizer = AutoTokenizer.from_pretrained(summarization_model_name)
|
|
|
62 |
|
63 |
|
64 |
# Function to load the vector database
|
@@ -238,9 +239,7 @@ def download_video_mp3(url):
|
|
238 |
|
239 |
def audio_to_text(filename):
|
240 |
|
241 |
-
|
242 |
-
result = model.transcribe(filename)
|
243 |
-
|
244 |
transcription = result["text"]
|
245 |
|
246 |
return transcription
|
|
|
59 |
summarization_model_name = "suriya7/bart-finetuned-text-summarization"
|
60 |
summarization_model = AutoModelForSeq2SeqLM.from_pretrained(summarization_model_name)
|
61 |
summarization_tokenizer = AutoTokenizer.from_pretrained(summarization_model_name)
|
62 |
+
whisper_model = whisper.load_model("tiny")
|
63 |
|
64 |
|
65 |
# Function to load the vector database
|
|
|
239 |
|
240 |
def audio_to_text(filename):
|
241 |
|
242 |
+
result = whisper_model.transcribe(filename)
|
|
|
|
|
243 |
transcription = result["text"]
|
244 |
|
245 |
return transcription
|