Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -83,6 +83,10 @@ def kill_proc():
|
|
83 |
|
84 |
|
85 |
if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
86 |
models = []
|
87 |
with open("saved_model/names.json", "r", encoding="utf-8") as f:
|
88 |
models_names = json.load(f)
|
@@ -146,7 +150,5 @@ if __name__ == '__main__':
|
|
146 |
vc_output1 = gr.Textbox(label="Output Message")
|
147 |
vc_output2 = gr.Audio(label="Output Audio")
|
148 |
vc_submit.click(vc_fn, [vc_input1, vc_input2, vc_input3], [vc_output1, vc_output2])
|
149 |
-
|
150 |
-
kill_proc()
|
151 |
# app.launch()
|
152 |
-
app.queue(client_position_to_load_data=10).launch()
|
|
|
83 |
|
84 |
|
85 |
if __name__ == '__main__':
|
86 |
+
kill_proc()
|
87 |
+
# I don't know why my space will restart unexpectedly and get OSError: All ports from 7860 to 7860 are in use.
|
88 |
+
# So I try to kill the process which using 7860 port.
|
89 |
+
|
90 |
models = []
|
91 |
with open("saved_model/names.json", "r", encoding="utf-8") as f:
|
92 |
models_names = json.load(f)
|
|
|
150 |
vc_output1 = gr.Textbox(label="Output Message")
|
151 |
vc_output2 = gr.Audio(label="Output Audio")
|
152 |
vc_submit.click(vc_fn, [vc_input1, vc_input2, vc_input3], [vc_output1, vc_output2])
|
|
|
|
|
153 |
# app.launch()
|
154 |
+
app.queue(concurrency_count=1, client_position_to_load_data=10).launch()
|