Persival123 commited on
Commit
9c0a2a7
1 Parent(s): c1f278b

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -231,8 +231,7 @@ def speech_to_text(video_file_path, selected_source_lang, whisper_model, num_spe
231
  # model = WhisperModel(whisper_model, device="cuda", compute_type="int8_float16")
232
  model = WhisperModel(whisper_model, compute_type="int8")
233
  time_start = time.time()
234
- if(video_file_path == None):
235
- raise ValueError("Error no video input")
236
  print(video_file_path)
237
 
238
  try:
@@ -384,7 +383,6 @@ with demo:
384
  upload = gr.inputs.Audio(source="upload", type="filepath", optional=True)
385
  with gr.Row():
386
  with gr.Column():
387
- video_in.render()
388
  with gr.Column():
389
  gr.Markdown('''
390
  ##### Here you can start the transcription process.
@@ -396,7 +394,7 @@ with demo:
396
  number_speakers.render()
397
  transcribe_btn = gr.Button("Transcribe audio and diarization")
398
  transcribe_btn.click(speech_to_text,
399
- [video_in, selected_source_lang, selected_whisper_model, number_speakers],
400
  [transcription_df, system_info, download_transcript]
401
  )
402
 
 
231
  # model = WhisperModel(whisper_model, device="cuda", compute_type="int8_float16")
232
  model = WhisperModel(whisper_model, compute_type="int8")
233
  time_start = time.time()
234
+
 
235
  print(video_file_path)
236
 
237
  try:
 
383
  upload = gr.inputs.Audio(source="upload", type="filepath", optional=True)
384
  with gr.Row():
385
  with gr.Column():
 
386
  with gr.Column():
387
  gr.Markdown('''
388
  ##### Here you can start the transcription process.
 
394
  number_speakers.render()
395
  transcribe_btn = gr.Button("Transcribe audio and diarization")
396
  transcribe_btn.click(speech_to_text,
397
+ [upload, selected_source_lang, selected_whisper_model, number_speakers],
398
  [transcription_df, system_info, download_transcript]
399
  )
400