Spaces:
Runtime error
Runtime error
update
Browse files
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'
|
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]
|