Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
print server.log contents on predict
Browse files
app.py
CHANGED
|
@@ -31,12 +31,6 @@ def run_xvaserver():
|
|
| 31 |
|
| 32 |
print('xVAServer running on port 8008')
|
| 33 |
|
| 34 |
-
# load default voice model
|
| 35 |
-
load_model()
|
| 36 |
-
|
| 37 |
-
predicted = predict('test', 1.0)
|
| 38 |
-
print(predicted)
|
| 39 |
-
|
| 40 |
# Read and print stdout and stderr of the subprocess
|
| 41 |
while True:
|
| 42 |
output = xvaserver.stdout.readline()
|
|
@@ -101,6 +95,11 @@ def predict(input, pacing):
|
|
| 101 |
}
|
| 102 |
response = requests.post('http://0.0.0.0:8008/synthesize', json=data)
|
| 103 |
response.raise_for_status() # If the response contains an HTTP error status code, raise an exception
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
return 22100, os.open(save_path, "rb")
|
| 105 |
|
| 106 |
input_textbox = gr.Textbox(
|
|
@@ -127,6 +126,12 @@ if __name__ == "__main__":
|
|
| 127 |
print('Starting xVAServer thread')
|
| 128 |
web_server_thread.start()
|
| 129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
print('running Gradio interface')
|
| 131 |
gradio_app.launch()
|
| 132 |
|
|
|
|
| 31 |
|
| 32 |
print('xVAServer running on port 8008')
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
# Read and print stdout and stderr of the subprocess
|
| 35 |
while True:
|
| 36 |
output = xvaserver.stdout.readline()
|
|
|
|
| 95 |
}
|
| 96 |
response = requests.post('http://0.0.0.0:8008/synthesize', json=data)
|
| 97 |
response.raise_for_status() # If the response contains an HTTP error status code, raise an exception
|
| 98 |
+
|
| 99 |
+
print('server.log contents:')
|
| 100 |
+
with open('server.log', 'r') as f:
|
| 101 |
+
print(f.read())
|
| 102 |
+
|
| 103 |
return 22100, os.open(save_path, "rb")
|
| 104 |
|
| 105 |
input_textbox = gr.Textbox(
|
|
|
|
| 126 |
print('Starting xVAServer thread')
|
| 127 |
web_server_thread.start()
|
| 128 |
|
| 129 |
+
# load default voice model
|
| 130 |
+
# load_model()
|
| 131 |
+
|
| 132 |
+
# predicted = predict('test', 1.0)
|
| 133 |
+
# print(predicted)
|
| 134 |
+
|
| 135 |
print('running Gradio interface')
|
| 136 |
gradio_app.launch()
|
| 137 |
|