Update app.py
Browse files
app.py
CHANGED
@@ -89,13 +89,22 @@ iface = gr.Interface(
|
|
89 |
).queue()
|
90 |
|
91 |
if __name__ == "__main__":
|
92 |
-
#
|
93 |
-
|
|
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
).queue()
|
90 |
|
91 |
if __name__ == "__main__":
|
92 |
+
# Create event loop for the main thread
|
93 |
+
loop = asyncio.new_event_loop()
|
94 |
+
asyncio.set_event_loop(loop)
|
95 |
|
96 |
+
try:
|
97 |
+
# Start RVC service
|
98 |
+
rvc_service.start()
|
99 |
+
|
100 |
+
# Launch Gradio interface
|
101 |
+
iface.launch(
|
102 |
+
debug=True,
|
103 |
+
show_error=True,
|
104 |
+
max_threads=10,
|
105 |
+
share=False
|
106 |
+
)
|
107 |
+
finally:
|
108 |
+
# Cleanup
|
109 |
+
rvc_service.stop()
|
110 |
+
loop.close()
|