Rashidkareem commited on
Commit
a69da22
·
verified ·
1 Parent(s): 598088d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -19
app.py CHANGED
@@ -5,6 +5,11 @@ import numpy as np
5
  import soundfile as sf
6
  import gradio as gr
7
 
 
 
 
 
 
8
  os.environ.setdefault("COQUI_TOS_AGREED", "1")
9
 
10
  MODEL_NAME = "tts_models/multilingual/multi-dataset/xtts_v2"
@@ -126,25 +131,8 @@ def tts_clone(text, ref_audio, lang_label, speed, split_sentences, progress=gr.P
126
  # return both: audio preview path, and a file path for DownloadButton
127
  return ntf_path, dl_path
128
 
129
- CUSTOM_CSS = """
130
- .gradio-container { max-width: 860px !important; margin: 0 auto; }
131
- #wrap, #ref, #lang, #txt, #spd, #split, #out_audio, #dl {
132
- background: #f8fafc !important;
133
- border: 1px solid #e5e7eb !important;
134
- border-radius: 14px !important;
135
- padding: 14px !important;
136
- }
137
- #ref, #out_audio, #dl { background: #eef2ff !important; }
138
- #gen button, #gen { background: #10b981 !important; color: #fff !important; }
139
- #gen button:hover { filter: brightness(0.95); }
140
- /* hide HF/Gradio chrome */
141
- footer, .footer, #footer,
142
- a[href*="gradio.live"], a[href*="gradio.app"], a[href*="/api"], a[href*="hf.space"],
143
- button[aria-label="Settings"],
144
- [data-testid="block-analytics"], [data-testid="embed-info"] { display: none !important; }
145
- """
146
-
147
- with gr.Blocks(title="VClone - Voice Cloning & TTS", css=CUSTOM_CSS, analytics_enabled=False) as demo:
148
  with gr.Column(elem_id="wrap"):
149
  gr.Markdown("## Vclone.vip — Professional Realistic AI Voice Cloning in Seconds")
150
  gr.Markdown("Upload a short **reference voice** (10–60s), choose **language**, enter **text**, then **Generate**. "
 
5
  import soundfile as sf
6
  import gradio as gr
7
 
8
+ # load custom css from external file
9
+ with open("style.css") as f:
10
+ custom_css = f.read()
11
+
12
+
13
  os.environ.setdefault("COQUI_TOS_AGREED", "1")
14
 
15
  MODEL_NAME = "tts_models/multilingual/multi-dataset/xtts_v2"
 
131
  # return both: audio preview path, and a file path for DownloadButton
132
  return ntf_path, dl_path
133
 
134
+
135
+ with gr.Blocks(title="VClone - Voice Cloning & TTS", css=custom_css, analytics_enabled=False) as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  with gr.Column(elem_id="wrap"):
137
  gr.Markdown("## Vclone.vip — Professional Realistic AI Voice Cloning in Seconds")
138
  gr.Markdown("Upload a short **reference voice** (10–60s), choose **language**, enter **text**, then **Generate**. "