Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
subprocess xvaserver
Browse files
app.py
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
-
import server as xvaserver
|
2 |
import gradio as gr
|
3 |
import requests
|
|
|
|
|
|
|
|
|
4 |
|
5 |
def predict(input):
|
6 |
model_type = 'xVAPitch'
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
+
from subprocess import Popen, PIPE
|
4 |
+
|
5 |
+
xvaserver = Popen(['py', 'server.py'], stdout=PIPE, stderr=PIPE)
|
6 |
+
stdout, stderr = process.communicate()
|
7 |
|
8 |
def predict(input):
|
9 |
model_type = 'xVAPitch'
|
server.py
CHANGED
@@ -5,8 +5,7 @@ import multiprocessing
|
|
5 |
|
6 |
torch_dml_device = None
|
7 |
|
8 |
-
|
9 |
-
if True:
|
10 |
server = None
|
11 |
multiprocessing.freeze_support()
|
12 |
|
|
|
5 |
|
6 |
torch_dml_device = None
|
7 |
|
8 |
+
if __name__ == '__main__':
|
|
|
9 |
server = None
|
10 |
multiprocessing.freeze_support()
|
11 |
|