aichina commited on
Commit
ace44db
1 Parent(s): fff8b5a
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -16,7 +16,7 @@ def get_video(url):
16
  # 下载视频
17
  url = url
18
  output_dir = '.'
19
- command = f'you-get -o {output_dir} {url}'
20
  print(command)
21
  subprocess.call(command, shell=True)
22
 
@@ -109,7 +109,9 @@ def get_transcript(url,openai_key):
109
  # 'Content-Type': 'multipart/form-data',
110
  }
111
  audio_file = get_audio(url)
112
- # audio_file = 'tmp.mp4'
 
 
113
  files = {
114
  'audio': (f"{audio_file}", open(f'{audio_file}', 'rb'), 'video/mp4'),
115
  'language': (None, 'english'),
 
16
  # 下载视频
17
  url = url
18
  output_dir = '.'
19
+ command = f'you-get -f mp4 -o {output_dir} {url}'
20
  print(command)
21
  subprocess.call(command, shell=True)
22
 
 
109
  # 'Content-Type': 'multipart/form-data',
110
  }
111
  audio_file = get_audio(url)
112
+
113
+ print(audio_file)
114
+
115
  files = {
116
  'audio': (f"{audio_file}", open(f'{audio_file}', 'rb'), 'video/mp4'),
117
  'language': (None, 'english'),