SteveDigital commited on
Commit
4a71c2c
1 Parent(s): 3f57b02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -22,7 +22,7 @@ def get_text(url):
22
  file_stats = os.stat(out_file)
23
  logging.info(f'Size of audio file in Bytes: {file_stats.st_size}')
24
 
25
- if file_stats.st_size <= 20000000:
26
  base, ext = os.path.splitext(out_file)
27
  new_file = base+'.mp3'
28
  os.rename(out_file, new_file)
@@ -48,8 +48,8 @@ with gr.Blocks() as demo:
48
  gr.Markdown("<center><b>'Whisper is a neural net that approaches human level robustness and accuracy on English speech recognition.'</b></center>")
49
  gr.Markdown("<center>Transcription takes 5-10 seconds per minute of the video (bad audio/hard accents slow it down a bit). #patience<br />If you have time while waiting, drop a ♥️ and check out my <a href=https://www.artificial-intelligence.blog target=_blank>AI blog</a> (opens in new tab).</center>")
50
 
51
- input_text_url = gr.Textbox(placeholder='Youtube video URL', label='URL')
52
- result_button_transcribe = gr.Button('1. Transcribe')
53
  output_text_transcribe = gr.Textbox(placeholder='Transcript of the YouTube video.', label='Transcript')
54
 
55
  #result_button_summary = gr.Button('2. Create Summary')
22
  file_stats = os.stat(out_file)
23
  logging.info(f'Size of audio file in Bytes: {file_stats.st_size}')
24
 
25
+ if file_stats.st_size <= 30000000:
26
  base, ext = os.path.splitext(out_file)
27
  new_file = base+'.mp3'
28
  os.rename(out_file, new_file)
48
  gr.Markdown("<center><b>'Whisper is a neural net that approaches human level robustness and accuracy on English speech recognition.'</b></center>")
49
  gr.Markdown("<center>Transcription takes 5-10 seconds per minute of the video (bad audio/hard accents slow it down a bit). #patience<br />If you have time while waiting, drop a ♥️ and check out my <a href=https://www.artificial-intelligence.blog target=_blank>AI blog</a> (opens in new tab).</center>")
50
 
51
+ input_text_url = gr.Textbox(placeholder='Youtube video URL', label='YouTube URL')
52
+ result_button_transcribe = gr.Button('Transcribe')
53
  output_text_transcribe = gr.Textbox(placeholder='Transcript of the YouTube video.', label='Transcript')
54
 
55
  #result_button_summary = gr.Button('2. Create Summary')