Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,12 +4,13 @@ from youtube_transcript_api import YouTubeTranscriptApi
|
|
4 |
import re
|
5 |
import tempfile
|
6 |
import os
|
7 |
-
from transformers import
|
8 |
import torch
|
|
|
9 |
|
10 |
# Load the Whisper model and processor from Hugging Face
|
11 |
-
processor =
|
12 |
-
model =
|
13 |
|
14 |
def transcribe_audio(file_path):
|
15 |
# Load audio file
|
|
|
4 |
import re
|
5 |
import tempfile
|
6 |
import os
|
7 |
+
from transformers import WhisperProcessor, WhisperForConditionalGeneration
|
8 |
import torch
|
9 |
+
import librosa
|
10 |
|
11 |
# Load the Whisper model and processor from Hugging Face
|
12 |
+
processor = WhisperProcessor.from_pretrained("openai/whisper-large-v2")
|
13 |
+
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v2")
|
14 |
|
15 |
def transcribe_audio(file_path):
|
16 |
# Load audio file
|