mboushaba commited on
Commit
b5233b9
·
verified ·
1 Parent(s): ec02589

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -26,12 +26,15 @@ def get_iso_code(language_label):
26
 
27
  # Function to handle the input and return the selections
28
  def process_inputs(source_lang, target_lang, model, task, audio_mic, audio_upload):
 
29
  audio = None
30
  if audio_mic:
31
  audio = audio_mic
32
  elif audio_upload:
33
  audio = audio_upload
 
34
  print(audio)
 
35
  response = vr.process_audio_recognition(model=model, audio_path=audio, source_lang=get_iso_code(source_lang),
36
  target_lang=get_iso_code(target_lang), translate= task == "Transcript and Translate")
37
  return response
@@ -77,4 +80,4 @@ with gr.Blocks(title = "Voice Transcription") as demo:
77
 
78
  if __name__ == '__main__':
79
  # check the model rate
80
- demo.launch(favicon_path = "favicon.ico")
 
26
 
27
  # Function to handle the input and return the selections
28
  def process_inputs(source_lang, target_lang, model, task, audio_mic, audio_upload):
29
+ print("button submit clicked !!")
30
  audio = None
31
  if audio_mic:
32
  audio = audio_mic
33
  elif audio_upload:
34
  audio = audio_upload
35
+ print("audio")
36
  print(audio)
37
+ print("----")
38
  response = vr.process_audio_recognition(model=model, audio_path=audio, source_lang=get_iso_code(source_lang),
39
  target_lang=get_iso_code(target_lang), translate= task == "Transcript and Translate")
40
  return response
 
80
 
81
  if __name__ == '__main__':
82
  # check the model rate
83
+ demo.launch(favicon_path = "./favicon.ico")