ysharma HF staff commited on
Commit
44db170
1 Parent(s): e14e08f
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,7 +40,7 @@ coquiTTS = CoquiTTS()
40
  # Driver function
41
  def driver_fun(audio, text) :
42
  print("*********** Inside Driver ************")
43
- if text == 'dummy': #audio is not None and
44
  print(f"Audio is {audio}")
45
  translation, lang = whisper_stt(audio)
46
  else:
@@ -60,7 +60,7 @@ def driver_fun(audio, text) :
60
  print(f"Error is : {data}")
61
  return 'Error in model inference - Run Again Please', 'Error in model inference - Run Again Please', None
62
  print(f"type(data) : {type(data)}")
63
- print(f"data : {data} ")
64
  max_match_score = max(data)
65
  indx_score = data.index(max_match_score)
66
  joke = dataset_subset[indx_score]
 
40
  # Driver function
41
  def driver_fun(audio, text) :
42
  print("*********** Inside Driver ************")
43
+ if (text == 'dummy') and (audio is not None) :
44
  print(f"Audio is {audio}")
45
  translation, lang = whisper_stt(audio)
46
  else:
 
60
  print(f"Error is : {data}")
61
  return 'Error in model inference - Run Again Please', 'Error in model inference - Run Again Please', None
62
  print(f"type(data) : {type(data)}")
63
+ #print(f"data : {data} ")
64
  max_match_score = max(data)
65
  indx_score = data.index(max_match_score)
66
  joke = dataset_subset[indx_score]