Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
xvaserver raise_for_status
Browse files
app.py
CHANGED
@@ -24,7 +24,11 @@ def run_xvaserver():
|
|
24 |
print("Web server failed to start.")
|
25 |
sys.exit(0)
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
|
28 |
print('xVAServer running on port 8008')
|
29 |
|
30 |
# Read and print stdout and stderr of the subprocess
|
|
|
24 |
print("Web server failed to start.")
|
25 |
sys.exit(0)
|
26 |
|
27 |
+
# contact local xVASynth server; ~2 second timeout
|
28 |
+
logging.info(f'Attempting to connect to xVASynth...')
|
29 |
+
response = requests.get('http://0.0.0.0:8008')
|
30 |
+
response.raise_for_status() # If the response contains an HTTP error status code, raise an exception
|
31 |
+
|
32 |
print('xVAServer running on port 8008')
|
33 |
|
34 |
# Read and print stdout and stderr of the subprocess
|