Campfireman commited on
Commit
f924533
1 Parent(s): 0a44200

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -5,7 +5,7 @@ import datetime
5
  import subprocess
6
  from moviepy.editor import *
7
  import gradio as gr
8
- from huggingface_hub import snapshot_download
9
  import huggingface_hub as hh
10
  from pytube import YouTube
11
 
@@ -55,7 +55,7 @@ def extract_audio():
55
  f_addr = temp_addr + "/" + convert_video_to_audio_ffmpeg(file)
56
  print("Current audio address:" + f_addr)
57
 
58
- snapshot_download(repo_id="Campfireman/YouTubeAudioGrabNTake", allow_patterns="*.mp3")
59
  notify = "Sucess. Download request will be pulled up soon. "
60
  print(notify)
61
 
@@ -65,6 +65,5 @@ def extrator_pipeline(url):
65
  extract_audio()
66
  return notify
67
 
68
- huggingface-cli login --token $HUG_READ
69
  demo = gr.Interface(fn=extrator_pipeline, inputs="text", outputs="text")
70
  demo.launch()
 
5
  import subprocess
6
  from moviepy.editor import *
7
  import gradio as gr
8
+ from huggingface_hub import hf_hub_download
9
  import huggingface_hub as hh
10
  from pytube import YouTube
11
 
 
55
  f_addr = temp_addr + "/" + convert_video_to_audio_ffmpeg(file)
56
  print("Current audio address:" + f_addr)
57
 
58
+ hf_hub_download(repo_id="Campfireman/YouTubeAudioGrabNTake", allow_patterns="*.mp3")
59
  notify = "Sucess. Download request will be pulled up soon. "
60
  print(notify)
61
 
 
65
  extract_audio()
66
  return notify
67
 
 
68
  demo = gr.Interface(fn=extrator_pipeline, inputs="text", outputs="text")
69
  demo.launch()