Spaces:
Sleeping
Sleeping
try with different model
Browse files
app.py
CHANGED
@@ -2,13 +2,14 @@ from transformers import pipeline
|
|
2 |
import gradio as gr
|
3 |
from pytube import YouTube
|
4 |
|
5 |
-
model = pipeline(model="SofiaK/
|
6 |
|
7 |
|
8 |
def youtube_to_text(youtube_url):
|
9 |
video = YouTube(youtube_url).streams.filter(only_audio=True).all()
|
10 |
audio = video[0].download()
|
11 |
text = model(audio)["text"]
|
|
|
12 |
return text
|
13 |
|
14 |
|
|
|
2 |
import gradio as gr
|
3 |
from pytube import YouTube
|
4 |
|
5 |
+
model = pipeline(model="SofiaK/checkpoints")
|
6 |
|
7 |
|
8 |
def youtube_to_text(youtube_url):
|
9 |
video = YouTube(youtube_url).streams.filter(only_audio=True).all()
|
10 |
audio = video[0].download()
|
11 |
text = model(audio)["text"]
|
12 |
+
# todo : remove the audio file after the inference
|
13 |
return text
|
14 |
|
15 |
|