Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadd _return_yt_html_embed function
app.py
CHANGED
@@ -35,6 +35,14 @@ scheduler = CommitScheduler(
|
|
35 |
path_in_repo="data",
|
36 |
)
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
@spaces.GPU(duration=120)
|
39 |
@lru_cache(maxsize=10)
|
40 |
def transcribe_audio(inputs, task):
|
|
|
35 |
path_in_repo="data",
|
36 |
)
|
37 |
|
38 |
+
def _return_yt_html_embed(yt_url):
|
39 |
+
video_id = yt_url.split("?v=")[-1]
|
40 |
+
HTML_str = (
|
41 |
+
f'<center> <iframe width="500" height="320" src="https://www.youtube.com/embed/{video_id}"> </iframe>'
|
42 |
+
" </center>"
|
43 |
+
)
|
44 |
+
return HTML_str
|
45 |
+
|
46 |
@spaces.GPU(duration=120)
|
47 |
@lru_cache(maxsize=10)
|
48 |
def transcribe_audio(inputs, task):
|