Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,9 @@ import torch
|
|
2 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
3 |
from transformers.pipelines.audio_utils import ffmpeg_read
|
4 |
import gradio as gr
|
5 |
-
from transformers import WhisperForConditionalGeneration, WhisperProcessor
|
6 |
-
from transformers.models.whisper.tokenization_whisper import LANGUAGES
|
7 |
-
from transformers.pipelines.audio_utils import ffmpeg_read
|
8 |
|
9 |
model_id = "openai/whisper-large-v2"
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
@@ -59,7 +59,6 @@ LANGUANGE_MAP = {
|
|
59 |
}
|
60 |
|
61 |
|
62 |
-
from pytube import YouTube
|
63 |
import whisper
|
64 |
|
65 |
# define function for transcription
|
|
|
2 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
3 |
from transformers.pipelines.audio_utils import ffmpeg_read
|
4 |
import gradio as gr
|
5 |
+
#from transformers import WhisperForConditionalGeneration, WhisperProcessor
|
6 |
+
#from transformers.models.whisper.tokenization_whisper import LANGUAGES
|
7 |
+
#from transformers.pipelines.audio_utils import ffmpeg_read
|
8 |
|
9 |
model_id = "openai/whisper-large-v2"
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
59 |
}
|
60 |
|
61 |
|
|
|
62 |
import whisper
|
63 |
|
64 |
# define function for transcription
|