Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
import re
|
3 |
import time
|
4 |
import sys
|
@@ -51,11 +52,11 @@ def predict(prompt, language, reference_audio):
|
|
51 |
sentences = split_text(prompt)
|
52 |
|
53 |
# Obtener los parámetros de la configuración JSON
|
54 |
-
temperature = config.get("temperature", 0.85)
|
55 |
-
length_penalty = config.get("length_penalty", 1.0)
|
56 |
-
repetition_penalty = config.get("repetition_penalty", 2.0)
|
57 |
-
top_k = config.get("top_k", 50)
|
58 |
-
top_p = config.get("top_p", 0.85)
|
59 |
|
60 |
gpt_cond_latent, speaker_embedding = model.get_conditioning_latents(
|
61 |
audio_path=reference_audio
|
|
|
1 |
import os
|
2 |
+
import AudioSegment
|
3 |
import re
|
4 |
import time
|
5 |
import sys
|
|
|
52 |
sentences = split_text(prompt)
|
53 |
|
54 |
# Obtener los parámetros de la configuración JSON
|
55 |
+
temperature = config.model_args.get("temperature", 0.85)
|
56 |
+
length_penalty = config.model_args.get("length_penalty", 1.0)
|
57 |
+
repetition_penalty = config.model_args.get("repetition_penalty", 2.0)
|
58 |
+
top_k = config.model_args.get("top_k", 50)
|
59 |
+
top_p = config.model_args.get("top_p", 0.85)
|
60 |
|
61 |
gpt_cond_latent, speaker_embedding = model.get_conditioning_latents(
|
62 |
audio_path=reference_audio
|