Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
60 second xvaserver Web request timeouts
Browse files
app.py
CHANGED
@@ -39,7 +39,6 @@ languages = [
|
|
39 |
("๐ต๐ฑ PL", "pl"),
|
40 |
("๐ท๐ด RO", "ro"),
|
41 |
("๐ธ๐ช SV", "sv"),
|
42 |
-
("SW", "sw"),
|
43 |
("๐ฉ๐ฐ DA", "da"),
|
44 |
("๐ซ๐ฎ FI", "fi"),
|
45 |
("๐ญ๐บ HU", "hu"),
|
@@ -56,6 +55,7 @@ languages = [
|
|
56 |
("๐ป๐ณ VI", "vi"),
|
57 |
("๐ป๐ฆ LA", "la"),
|
58 |
("HA", "ha"),
|
|
|
59 |
("๐ณ๐ฌ YO", "yo"),
|
60 |
("WO", "wo"),
|
61 |
]
|
@@ -138,7 +138,7 @@ def load_model(voice_model_name):
|
|
138 |
}
|
139 |
|
140 |
try:
|
141 |
-
response = requests.post('http://0.0.0.0:8008/loadModel', json=data)
|
142 |
response.raise_for_status() # If the response contains an HTTP error status code, raise an exception
|
143 |
current_voice_model = voice_model_name
|
144 |
except requests.exceptions.RequestException as err:
|
@@ -196,7 +196,7 @@ def predict(
|
|
196 |
}
|
197 |
|
198 |
try:
|
199 |
-
response = requests.post('http://0.0.0.0:8008/synthesize', json=data)
|
200 |
response.raise_for_status() # If the response contains an HTTP error status code, raise an exception
|
201 |
except requests.exceptions.RequestException as err:
|
202 |
print('Failed to synthesize!')
|
|
|
39 |
("๐ต๐ฑ PL", "pl"),
|
40 |
("๐ท๐ด RO", "ro"),
|
41 |
("๐ธ๐ช SV", "sv"),
|
|
|
42 |
("๐ฉ๐ฐ DA", "da"),
|
43 |
("๐ซ๐ฎ FI", "fi"),
|
44 |
("๐ญ๐บ HU", "hu"),
|
|
|
55 |
("๐ป๐ณ VI", "vi"),
|
56 |
("๐ป๐ฆ LA", "la"),
|
57 |
("HA", "ha"),
|
58 |
+
("SW", "sw"),
|
59 |
("๐ณ๐ฌ YO", "yo"),
|
60 |
("WO", "wo"),
|
61 |
]
|
|
|
138 |
}
|
139 |
|
140 |
try:
|
141 |
+
response = requests.post('http://0.0.0.0:8008/loadModel', json=data, timeout=60)
|
142 |
response.raise_for_status() # If the response contains an HTTP error status code, raise an exception
|
143 |
current_voice_model = voice_model_name
|
144 |
except requests.exceptions.RequestException as err:
|
|
|
196 |
}
|
197 |
|
198 |
try:
|
199 |
+
response = requests.post('http://0.0.0.0:8008/synthesize', json=data, timeout=60)
|
200 |
response.raise_for_status() # If the response contains an HTTP error status code, raise an exception
|
201 |
except requests.exceptions.RequestException as err:
|
202 |
print('Failed to synthesize!')
|