Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
spactabs...
Browse files
app.py
CHANGED
|
@@ -15,12 +15,12 @@ def run_xvaserver():
|
|
| 15 |
print('Could not run xVASynth.')
|
| 16 |
sys.exit(0)
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
sys.exit(0)
|
| 25 |
|
| 26 |
requests.get('http://0.0.0.0:8008')
|
|
|
|
| 15 |
print('Could not run xVASynth.')
|
| 16 |
sys.exit(0)
|
| 17 |
|
| 18 |
+
# Wait for a moment to ensure the server starts up
|
| 19 |
+
time.sleep(10)
|
| 20 |
|
| 21 |
+
# Check if the server is running
|
| 22 |
+
if xvaserver.poll() is not None:
|
| 23 |
+
print("Web server failed to start.")
|
| 24 |
sys.exit(0)
|
| 25 |
|
| 26 |
requests.get('http://0.0.0.0:8008')
|