Spaces:
Sleeping
Sleeping
Update app.py
#1
by
Siddhant
- opened
app.py
CHANGED
@@ -302,7 +302,11 @@ def start_warmup():
|
|
302 |
LLM_options = LLM_options[:opt_count] + LLM_options[(opt_count + 1) :]
|
303 |
if opt == LLM_name:
|
304 |
LLM_name = LLM_options[0]
|
|
|
305 |
for opt_count in range(len(TTS_options)):
|
|
|
|
|
|
|
306 |
opt = TTS_options[opt_count]
|
307 |
try:
|
308 |
for _ in dialogue_model.handle_TTS_selection(opt):
|
@@ -310,6 +314,7 @@ def start_warmup():
|
|
310 |
except Exception:
|
311 |
print("Removing " + opt + " from TTS options since it cannot be loaded.")
|
312 |
TTS_options = TTS_options[:opt_count] + TTS_options[(opt_count + 1) :]
|
|
|
313 |
if opt == TTS_name:
|
314 |
TTS_name = TTS_options[0]
|
315 |
dialogue_model.handle_E2E_selection()
|
|
|
302 |
LLM_options = LLM_options[:opt_count] + LLM_options[(opt_count + 1) :]
|
303 |
if opt == LLM_name:
|
304 |
LLM_name = LLM_options[0]
|
305 |
+
remove=0
|
306 |
for opt_count in range(len(TTS_options)):
|
307 |
+
opt_count-=remove
|
308 |
+
if opt_count>=len(TTS_options):
|
309 |
+
break
|
310 |
opt = TTS_options[opt_count]
|
311 |
try:
|
312 |
for _ in dialogue_model.handle_TTS_selection(opt):
|
|
|
314 |
except Exception:
|
315 |
print("Removing " + opt + " from TTS options since it cannot be loaded.")
|
316 |
TTS_options = TTS_options[:opt_count] + TTS_options[(opt_count + 1) :]
|
317 |
+
remove+=1
|
318 |
if opt == TTS_name:
|
319 |
TTS_name = TTS_options[0]
|
320 |
dialogue_model.handle_E2E_selection()
|