Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
catch model raised except
Browse files
app.py
CHANGED
@@ -75,8 +75,12 @@ def load_model():
|
|
75 |
'base_lang': language,
|
76 |
'pluginsContext': '{}',
|
77 |
}
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
80 |
return
|
81 |
|
82 |
def predict(input, pacing):
|
|
|
75 |
'base_lang': language,
|
76 |
'pluginsContext': '{}',
|
77 |
}
|
78 |
+
|
79 |
+
try:
|
80 |
+
response = requests.post('http://0.0.0.0:8008/loadModel', json=data)
|
81 |
+
response.raise_for_status() # If the response contains an HTTP error status code, raise an exception
|
82 |
+
except requests.exceptions.RequestException as err:
|
83 |
+
print('Failed to load voice model!')
|
84 |
return
|
85 |
|
86 |
def predict(input, pacing):
|