Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mrfakename
commited on
Commit
β’
53e5e28
1
Parent(s):
ce2e52d
Update app.py
Browse files
app.py
CHANGED
@@ -605,6 +605,7 @@ def synthandreturn(text):
|
|
605 |
results = {}
|
606 |
thread1 = threading.Thread(target=predict_and_update_result, args=(text, mdl1, results))
|
607 |
thread2 = threading.Thread(target=predict_and_update_result, args=(text, mdl2, results))
|
|
|
608 |
thread1.start()
|
609 |
thread2.start()
|
610 |
thread1.join()
|
@@ -618,6 +619,8 @@ def synthandreturn(text):
|
|
618 |
# y, sr = librosa.load(results[list(results.keys())[1]], sr=None)
|
619 |
# print(sr)
|
620 |
#debug
|
|
|
|
|
621 |
return (
|
622 |
text,
|
623 |
"Synthesize",
|
@@ -696,7 +699,8 @@ with gr.Blocks() as vote:
|
|
696 |
randomt = gr.Button('π²', scale=0, min_width=0, variant='tool')
|
697 |
randomt.click(randomsent, outputs=[text, randomt])
|
698 |
btn = gr.Button("Synthesize", variant='primary')
|
699 |
-
model1 = gr.Textbox(interactive=False, lines=1, max_lines=1, visible=False)
|
|
|
700 |
model2 = gr.Textbox(interactive=False, lines=1, max_lines=1, visible=False)
|
701 |
with gr.Row(visible=False) as r2:
|
702 |
with gr.Column():
|
|
|
605 |
results = {}
|
606 |
thread1 = threading.Thread(target=predict_and_update_result, args=(text, mdl1, results))
|
607 |
thread2 = threading.Thread(target=predict_and_update_result, args=(text, mdl2, results))
|
608 |
+
|
609 |
thread1.start()
|
610 |
thread2.start()
|
611 |
thread1.join()
|
|
|
619 |
# y, sr = librosa.load(results[list(results.keys())[1]], sr=None)
|
620 |
# print(sr)
|
621 |
#debug
|
622 |
+
# outputs = [text, btn, r2, model1, model2, aud1, aud2, abetter, bbetter, prevmodel1, prevmodel2, nxtroundbtn]
|
623 |
+
|
624 |
return (
|
625 |
text,
|
626 |
"Synthesize",
|
|
|
699 |
randomt = gr.Button('π²', scale=0, min_width=0, variant='tool')
|
700 |
randomt.click(randomsent, outputs=[text, randomt])
|
701 |
btn = gr.Button("Synthesize", variant='primary')
|
702 |
+
# model1 = gr.Textbox(interactive=False, lines=1, max_lines=1, visible=False)
|
703 |
+
model1 = gr.Textbox(interactive=False, lines=1, max_lines=1, visible=True)
|
704 |
model2 = gr.Textbox(interactive=False, lines=1, max_lines=1, visible=False)
|
705 |
with gr.Row(visible=False) as r2:
|
706 |
with gr.Column():
|