Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -275,7 +275,13 @@ def start_warmup():
|
|
| 275 |
global ASR_name
|
| 276 |
global LLM_name
|
| 277 |
global TTS_name
|
|
|
|
| 278 |
for opt_count in range(len(ASR_options)):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 279 |
opt = ASR_options[opt_count]
|
| 280 |
try:
|
| 281 |
for _ in dialogue_model.handle_ASR_selection(opt):
|
|
@@ -283,7 +289,7 @@ def start_warmup():
|
|
| 283 |
except Exception:
|
| 284 |
print("Removing " + opt + " from ASR options since it cannot be loaded.")
|
| 285 |
ASR_options = ASR_options[:opt_count] + ASR_options[(opt_count + 1) :]
|
| 286 |
-
|
| 287 |
if opt == ASR_name:
|
| 288 |
ASR_name = ASR_options[0]
|
| 289 |
for opt_count in range(len(LLM_options)):
|
|
|
|
| 275 |
global ASR_name
|
| 276 |
global LLM_name
|
| 277 |
global TTS_name
|
| 278 |
+
remove=0
|
| 279 |
for opt_count in range(len(ASR_options)):
|
| 280 |
+
opt_count-=remove
|
| 281 |
+
if opt_count>=len(ASR_options):
|
| 282 |
+
break
|
| 283 |
+
print(opt_count)
|
| 284 |
+
print(ASR_options)
|
| 285 |
opt = ASR_options[opt_count]
|
| 286 |
try:
|
| 287 |
for _ in dialogue_model.handle_ASR_selection(opt):
|
|
|
|
| 289 |
except Exception:
|
| 290 |
print("Removing " + opt + " from ASR options since it cannot be loaded.")
|
| 291 |
ASR_options = ASR_options[:opt_count] + ASR_options[(opt_count + 1) :]
|
| 292 |
+
remove+=1
|
| 293 |
if opt == ASR_name:
|
| 294 |
ASR_name = ASR_options[0]
|
| 295 |
for opt_count in range(len(LLM_options)):
|