Spaces:
Build error
Build error
adjoint-bass
commited on
Commit
•
8e990cb
1
Parent(s):
5b077dd
updating app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
-
import hopsworks
|
4 |
from pytube import YouTube
|
5 |
|
6 |
-
|
7 |
-
data = amp.get_model_registry()
|
8 |
-
|
9 |
-
pipe = pipeline(model = 'CsanadT/model_name')
|
10 |
|
11 |
def live_performance(audio):
|
12 |
text = pipe(audio)['text']
|
13 |
return text
|
14 |
|
15 |
def url_performance(link):
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
|
18 |
|
19 |
with gr.Blocks() as demo:
|
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
|
|
3 |
from pytube import YouTube
|
4 |
|
5 |
+
pipe = pipeline(model = 'openai/whisper-small')
|
|
|
|
|
|
|
6 |
|
7 |
def live_performance(audio):
|
8 |
text = pipe(audio)['text']
|
9 |
return text
|
10 |
|
11 |
def url_performance(link):
|
12 |
+
yt = YouTube(str(link))
|
13 |
+
audio= yt.streams.filter(only_audio=True).first()
|
14 |
+
text = pipe(audio)['text']
|
15 |
+
return text
|
16 |
+
|
17 |
|
18 |
|
19 |
with gr.Blocks() as demo:
|