kwmr commited on
Commit
e0afab2
1 Parent(s): c0a6bf7
Files changed (2) hide show
  1. .gitignore +2 -0
  2. app.py +2 -4
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *.mp4
2
+ notebooks/*
app.py CHANGED
@@ -34,7 +34,6 @@ def get_youtube(video_url):
34
  abs_video_path = yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download(filename='download.mp4', output_path='movies/')
35
  print("Success download video")
36
  print(abs_video_path)
37
-
38
  return abs_video_path
39
 
40
  def two_chnnel_to_one_channel(sample):
@@ -52,9 +51,7 @@ def convert_sample_rate(data, original_sr, target_sr):
52
  def summarize_video(video_path, ratio_sum, playback_speed):
53
  print("Start summarize video")
54
  output_path = os.path.join(os.path.dirname(video_path), 'output.mp4')
55
-
56
  movie_clip = VideoFileClip(video_path)
57
-
58
  audio_sampling_rate = movie_clip.audio.fps
59
  clip_audio = np.array(movie_clip.audio.to_soundarray())
60
 
@@ -231,4 +228,5 @@ with demo:
231
  with gr.Row():
232
  transcription_text.render()
233
 
234
- demo.launch(debug=True)
 
 
34
  abs_video_path = yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download(filename='download.mp4', output_path='movies/')
35
  print("Success download video")
36
  print(abs_video_path)
 
37
  return abs_video_path
38
 
39
  def two_chnnel_to_one_channel(sample):
 
51
  def summarize_video(video_path, ratio_sum, playback_speed):
52
  print("Start summarize video")
53
  output_path = os.path.join(os.path.dirname(video_path), 'output.mp4')
 
54
  movie_clip = VideoFileClip(video_path)
 
55
  audio_sampling_rate = movie_clip.audio.fps
56
  clip_audio = np.array(movie_clip.audio.to_soundarray())
57
 
 
228
  with gr.Row():
229
  transcription_text.render()
230
 
231
+ demo.launch(debug=True)
232
+ # demo.launch(debug=True, share=True)