Loren commited on
Commit
e80735d
·
verified ·
1 Parent(s): 26b8f27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -27,9 +27,14 @@ dict_languages = {"English": "en",
27
  @spaces.GPU
28
  def process_transcript(language, audio_path, model, processor):
29
  """Process audio with selected Voxtral model and return the generated response"""
30
- print("audio_path:", audio_path)
 
31
  if audio_path is None:
 
32
  raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone")
 
 
 
33
  id_language = dict_languages[language]
34
  inputs = processor.apply_transcrition_request(language=id_language, audio=audio_path, model_id=model_name)
35
  inputs = inputs.to(device, dtype=torch.bfloat16)
 
27
  @spaces.GPU
28
  def process_transcript(language, audio_path, model, processor):
29
  """Process audio with selected Voxtral model and return the generated response"""
30
+ print("*** DANS PROCESS")
31
+
32
  if audio_path is None:
33
+ print("***** audio_path VIDE")
34
  raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone")
35
+ else:
36
+ print("***** audio_path NON VIDE")
37
+ print("audio_path:", audio_path)
38
  id_language = dict_languages[language]
39
  inputs = processor.apply_transcrition_request(language=id_language, audio=audio_path, model_id=model_name)
40
  inputs = inputs.to(device, dtype=torch.bfloat16)