Victorlopo21 commited on
Commit
b446731
·
1 Parent(s): 6fa0583

Rename whisper_youtube.py to app.py

Browse files
Files changed (1) hide show
  1. whisper_youtube.py → app.py +4 -11
whisper_youtube.py → app.py RENAMED
@@ -12,24 +12,17 @@ Youtube link version.
12
  Installing requirements.
13
  """
14
 
15
- !pip install gradio
16
- !pip install git+https://github.com/huggingface/transformers
17
 
18
- !pip install pytube
19
 
20
  from pytube import YouTube
21
  from transformers import pipeline
22
  import gradio as gr
23
  import os
24
 
25
- from transformers import WhisperProcessor
26
 
27
- processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="Galician", task="transcribe")
28
-
29
-
30
- from transformers import WhisperTokenizer
31
-
32
- tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="Galician", task="transcribe")
33
 
34
  """## Building a Demo
35
 
@@ -64,7 +57,7 @@ iface = gr.Interface(
64
  inputs='text',
65
  outputs="text",
66
  title="Whisper Medium Galician",
67
- description="Realtime demo for Galician speech recognition using a fine-tuned Whisper medium model.",
68
  )
69
 
70
  iface.launch(debug=True)
 
12
  Installing requirements.
13
  """
14
 
15
+ #!pip install gradio
16
+ #!pip install git+https://github.com/huggingface/transformers
17
 
18
+ #!pip install pytube
19
 
20
  from pytube import YouTube
21
  from transformers import pipeline
22
  import gradio as gr
23
  import os
24
 
 
25
 
 
 
 
 
 
 
26
 
27
  """## Building a Demo
28
 
 
57
  inputs='text',
58
  outputs="text",
59
  title="Whisper Medium Galician",
60
+ description="Realtime demo for Galician speech recognition of a YouTube video using a fine-tuned Whisper medium model.",
61
  )
62
 
63
  iface.launch(debug=True)