Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -265,6 +265,14 @@ print("Memuat model rmvpe...")
|
|
| 265 |
rmvpe_model = RMVPE("rmvpe.pt", config.is_half, config.device)
|
| 266 |
print("Model rmvpe dimuat.")
|
| 267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 268 |
# Initial markdown text untuk ditampilkan di antarmuka
|
| 269 |
initial_md = """
|
| 270 |
<h1 align="center"><b> TTS RVC Indonesia π΅ </b></h1>
|
|
@@ -280,17 +288,21 @@ Pembuktian algoritma **Retrieval-based Voice Conversion (RVC)** dan teknologi **
|
|
| 280 |
app = gr.Blocks(theme="Thatguy099/Sonix", title="TTS-RVC-Artis Indonesia")
|
| 281 |
with app:
|
| 282 |
gr.Markdown(initial_md)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
with gr.Row():
|
| 284 |
-
with gr.
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
)
|
| 290 |
-
f0_key_up = gr.Number(
|
| 291 |
-
label="Tune (+12 = 1 oktaf dari edge-tts, nilai terbaik tergantung pada model dan pembicara)",
|
| 292 |
-
value=2,
|
| 293 |
-
)
|
| 294 |
with gr.Column():
|
| 295 |
|
| 296 |
index_rate = gr.Slider(
|
|
@@ -308,7 +320,6 @@ with app:
|
|
| 308 |
step=0.01,
|
| 309 |
interactive=True,
|
| 310 |
)
|
| 311 |
-
with gr.Row():
|
| 312 |
with gr.Column():
|
| 313 |
tts_voice = gr.Dropdown(
|
| 314 |
label="Pembicara Edge-tts (format: bahasa-Negara-Nama-Jenis Kelamin), pastikan jenis kelamin cocok dengan model",
|
|
|
|
| 265 |
rmvpe_model = RMVPE("rmvpe.pt", config.is_half, config.device)
|
| 266 |
print("Model rmvpe dimuat.")
|
| 267 |
|
| 268 |
+
|
| 269 |
+
def download_model(url, model_name):
|
| 270 |
+
from tools.huggingface import HF_download_file
|
| 271 |
+
model_folder = "weights"
|
| 272 |
+
output_path = os.path.join(model_folder, model_name)
|
| 273 |
+
HF_download_file(url, output_path=None)
|
| 274 |
+
|
| 275 |
+
|
| 276 |
# Initial markdown text untuk ditampilkan di antarmuka
|
| 277 |
initial_md = """
|
| 278 |
<h1 align="center"><b> TTS RVC Indonesia π΅ </b></h1>
|
|
|
|
| 288 |
app = gr.Blocks(theme="Thatguy099/Sonix", title="TTS-RVC-Artis Indonesia")
|
| 289 |
with app:
|
| 290 |
gr.Markdown(initial_md)
|
| 291 |
+
model_name = gr.Dropdown(
|
| 292 |
+
label="Model",
|
| 293 |
+
choices=models,
|
| 294 |
+
value=models[0],
|
| 295 |
+
)
|
| 296 |
+
f0_key_up = gr.Number(
|
| 297 |
+
label="Tune (+12 = 1 oktaf dari edge-tts, nilai terbaik tergantung pada model dan pembicara)",
|
| 298 |
+
value=2,
|
| 299 |
+
)
|
| 300 |
with gr.Row():
|
| 301 |
+
with gr.Tab("Download Modelz"):
|
| 302 |
+
url = gr.Textbox(label="model URL")
|
| 303 |
+
model_nae = gr.Textbox(label=" Nama Model")
|
| 304 |
+
dlm = gr.Button("Download Model")
|
| 305 |
+
dlm.click(fn=download_model, inputs=[url, model_nae], outputs=None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
with gr.Column():
|
| 307 |
|
| 308 |
index_rate = gr.Slider(
|
|
|
|
| 320 |
step=0.01,
|
| 321 |
interactive=True,
|
| 322 |
)
|
|
|
|
| 323 |
with gr.Column():
|
| 324 |
tts_voice = gr.Dropdown(
|
| 325 |
label="Pembicara Edge-tts (format: bahasa-Negara-Nama-Jenis Kelamin), pastikan jenis kelamin cocok dengan model",
|