divython commited on
Commit
c042fca
·
verified ·
1 Parent(s): 4b7eb7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,8 +6,7 @@ import tempfile
6
  import os
7
  import yt_dlp
8
 
9
- def download_audio(url):
10
- cookies_path = os.path.join(os.getenv('HF_HOME', '/home/user/app'), 'cookies.txt')
11
  ydl_opts = {
12
  'format': 'bestaudio/best',
13
  'outtmpl': 'audio.%(ext)s',
@@ -21,6 +20,7 @@ def download_audio(url):
21
  with yt_dlp.YoutubeDL(ydl_opts) as ydl:
22
  ydl.download([url])
23
 
 
24
  def process_video(url, cookies_path):
25
  audio_file = download_audio(url, cookies_path)
26
  model = whisper.load_model("base")
 
6
  import os
7
  import yt_dlp
8
 
9
+ def download_audio(url, cookies_path):
 
10
  ydl_opts = {
11
  'format': 'bestaudio/best',
12
  'outtmpl': 'audio.%(ext)s',
 
20
  with yt_dlp.YoutubeDL(ydl_opts) as ydl:
21
  ydl.download([url])
22
 
23
+
24
  def process_video(url, cookies_path):
25
  audio_file = download_audio(url, cookies_path)
26
  model = whisper.load_model("base")