Spaces:
Sleeping
Sleeping
Changes reverted
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ def generate(model, text, audio_prompt_path, exaggeration, temperature, seed_num
|
|
| 29 |
if model is None:
|
| 30 |
model = ChatterboxTTS.from_pretrained(DEVICE)
|
| 31 |
|
| 32 |
-
if
|
| 33 |
set_seed(int(seed_num))
|
| 34 |
|
| 35 |
wav = model.generate(
|
|
@@ -91,9 +91,6 @@ with gr.Blocks() as demo:
|
|
| 91 |
)
|
| 92 |
|
| 93 |
if __name__ == "__main__":
|
| 94 |
-
print("🔧 Loading model...")
|
| 95 |
-
model = load_model() # Load it ONCE globally
|
| 96 |
-
print("✅ Model loaded.")
|
| 97 |
demo.queue(
|
| 98 |
max_size=50,
|
| 99 |
default_concurrency_limit=1,
|
|
|
|
| 29 |
if model is None:
|
| 30 |
model = ChatterboxTTS.from_pretrained(DEVICE)
|
| 31 |
|
| 32 |
+
if seed_num != 0:
|
| 33 |
set_seed(int(seed_num))
|
| 34 |
|
| 35 |
wav = model.generate(
|
|
|
|
| 91 |
)
|
| 92 |
|
| 93 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
| 94 |
demo.queue(
|
| 95 |
max_size=50,
|
| 96 |
default_concurrency_limit=1,
|