Pendrokar commited on
Commit
c79df46
β€’
1 Parent(s): ce58239

subprocess xvaserver

Browse files
Files changed (2) hide show
  1. app.py +4 -1
  2. server.py +1 -2
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
- # if __name__ == '__main__':
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