Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
py indent fix
Browse files
app.py
CHANGED
@@ -56,9 +56,9 @@ def load_model(voice_model_name):
|
|
56 |
with open(model_path + '.json', 'r', encoding='utf-8') as f:
|
57 |
voice_model_json = json.load(f)
|
58 |
|
59 |
-
|
60 |
embs = voice_model_json['games'][0]['base_speaker_emb']
|
61 |
-
|
62 |
embs = voice_model_json['games'][0]['resemblyzer']
|
63 |
except requests.exceptions.RequestException as err:
|
64 |
print(f'FAILED to load voice model: {err}')
|
|
|
56 |
with open(model_path + '.json', 'r', encoding='utf-8') as f:
|
57 |
voice_model_json = json.load(f)
|
58 |
|
59 |
+
if model_type == 'xVAPitch':
|
60 |
embs = voice_model_json['games'][0]['base_speaker_emb']
|
61 |
+
elif model_type == 'FastPitch1.1':
|
62 |
embs = voice_model_json['games'][0]['resemblyzer']
|
63 |
except requests.exceptions.RequestException as err:
|
64 |
print(f'FAILED to load voice model: {err}')
|