Spaces:
Runtime error
Runtime error
David Li
commited on
Commit
•
d255f96
1
Parent(s):
4865ee0
fix: dependencies
Browse files- app.py +2 -2
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import whisper
|
2 |
import gradio as gr
|
3 |
import ffmpeg
|
4 |
-
import
|
5 |
import os
|
6 |
|
7 |
youtube_livestream_codes = [
|
@@ -26,7 +26,7 @@ youtube_mp4_codes = [
|
|
26 |
import sys
|
27 |
|
28 |
def get_video_metadata(video_url: str = "https://www.youtube.com/watch?v=21X5lGlDOfg&ab_channel=NASA")-> dict:
|
29 |
-
with
|
30 |
info_dict = ydl.extract_info(video_url, download=False)
|
31 |
video_title = info_dict.get('title', None)
|
32 |
uploader_id = info_dict.get('uploader_id', None)
|
|
|
1 |
import whisper
|
2 |
import gradio as gr
|
3 |
import ffmpeg
|
4 |
+
from yt_dlp import YoutubeDL
|
5 |
import os
|
6 |
|
7 |
youtube_livestream_codes = [
|
|
|
26 |
import sys
|
27 |
|
28 |
def get_video_metadata(video_url: str = "https://www.youtube.com/watch?v=21X5lGlDOfg&ab_channel=NASA")-> dict:
|
29 |
+
with YoutubeDL({'outtmpl': '%(id)s.%(ext)s'}) as ydl:
|
30 |
info_dict = ydl.extract_info(video_url, download=False)
|
31 |
video_title = info_dict.get('title', None)
|
32 |
uploader_id = info_dict.get('uploader_id', None)
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
openai-whisper
|
2 |
-
|
3 |
ffmpeg-python
|
4 |
gradio
|
|
|
1 |
openai-whisper
|
2 |
+
yt-dlp
|
3 |
ffmpeg-python
|
4 |
gradio
|