pnnbao-ump commited on
Commit
52be161
·
1 Parent(s): 863b7f0

add more examples

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -1,12 +1,12 @@
1
- import spaces # PHẢI import TRƯỚC mọi thứ!
2
  import os
3
- os.environ['SPACES_ZERO_GPU'] = '1' # Set environment variable
 
4
  import gradio as gr
5
  import soundfile as sf
6
  import tempfile
7
  import torch
8
  from vieneu_tts import VieNeuTTS
9
- import os
10
  import time
11
 
12
  print("⏳ Đang khởi động VieNeu-TTS...")
@@ -120,7 +120,8 @@ def synthesize_speech(text, voice_choice, custom_audio, custom_text, mode_tab):
120
  return None, f"❌ Lỗi hệ thống: {str(e)}"
121
 
122
  # --- 4. UI SETUP ---
123
- theme = gr.themes.Ocean(
 
124
  primary_hue="indigo",
125
  secondary_hue="cyan",
126
  neutral_hue="slate",
 
1
+ import spaces # PHẢI import TRƯỚC mọi thứ trên HF Spaces ZeroGPU
2
  import os
3
+ os.environ['SPACES_ZERO_GPU'] = '1' # Set environment variable explicitly
4
+
5
  import gradio as gr
6
  import soundfile as sf
7
  import tempfile
8
  import torch
9
  from vieneu_tts import VieNeuTTS
 
10
  import time
11
 
12
  print("⏳ Đang khởi động VieNeu-TTS...")
 
120
  return None, f"❌ Lỗi hệ thống: {str(e)}"
121
 
122
  # --- 4. UI SETUP ---
123
+ # SỬA LỖI Ở ĐÂY: Đổi gr.themes.Ocean -> gr.themes.Soft
124
+ theme = gr.themes.Soft(
125
  primary_hue="indigo",
126
  secondary_hue="cyan",
127
  neutral_hue="slate",