Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,7 +74,7 @@ def download_models():
|
|
| 74 |
|
| 75 |
download_models()
|
| 76 |
|
| 77 |
-
print("\n-------------------------------\nRVC v2 Easy GUI
|
| 78 |
|
| 79 |
def formant_apply(qfrency, tmbre):
|
| 80 |
Quefrency = qfrency
|
|
@@ -1480,13 +1480,43 @@ def zip_downloader(model):
|
|
| 1480 |
return [f'./weights/{model}.pth', f'./logs/{model}/{log_file}'], "Done"
|
| 1481 |
else:
|
| 1482 |
return f'./weights/{model}.pth', "Could not find Index file."
|
|
|
|
|
|
|
|
|
|
| 1483 |
|
| 1484 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1485 |
with gr.Tabs():
|
| 1486 |
-
with gr.TabItem("Inference"):
|
| 1487 |
-
gr.HTML("<
|
| 1488 |
-
gr.HTML("<h10> Você pode encontrar mais modelos em AI Hub: https://discord.gg/aihub <br> ou AI Hub Brasil https://discord.gg/aihubrasil </h10>")
|
| 1489 |
-
gr.HTML("<h4> Huggingface port by Ilaria of the Rejekt Easy GUI </h4>")
|
| 1490 |
|
| 1491 |
# Inference Preset Row
|
| 1492 |
# with gr.Row():
|
|
@@ -1519,11 +1549,11 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
| 1519 |
inputs=[sid0],
|
| 1520 |
outputs=[spk_item],
|
| 1521 |
)
|
| 1522 |
-
but0 = gr.Button("
|
| 1523 |
with gr.Row():
|
| 1524 |
with gr.Column():
|
| 1525 |
with gr.Row():
|
| 1526 |
-
dropbox = gr.File(label="
|
| 1527 |
with gr.Row():
|
| 1528 |
record_button=gr.Audio(source="microphone", label="Ou você pode usar seu microfone!", type="filepath")
|
| 1529 |
with gr.Row():
|
|
@@ -1564,7 +1594,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
| 1564 |
|
| 1565 |
with gr.Column():
|
| 1566 |
vc_output2 = gr.Audio(
|
| 1567 |
-
label="
|
| 1568 |
type='filepath',
|
| 1569 |
interactive=False,
|
| 1570 |
)
|
|
@@ -1855,12 +1885,6 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
| 1855 |
with gr.Row():
|
| 1856 |
status_bar=gr.Textbox(label="Status do download")
|
| 1857 |
download_button.click(fn=download_from_url, inputs=[url, model], outputs=[status_bar])
|
| 1858 |
-
with gr.Row():
|
| 1859 |
-
gr.Markdown(
|
| 1860 |
-
"""
|
| 1861 |
-
Feito com 💖 por Ilaria | Traduzido por Rafael Godoy | Suporte no servidor do Discord AI HUB Brasil ou Global
|
| 1862 |
-
"""
|
| 1863 |
-
)
|
| 1864 |
|
| 1865 |
def has_two_files_in_pretrained_folder():
|
| 1866 |
pretrained_folder = "./pretrained/"
|
|
@@ -2104,10 +2128,15 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
| 2104 |
|
| 2105 |
else:
|
| 2106 |
print(
|
| 2107 |
-
"
|
| 2108 |
-
"
|
| 2109 |
"-------------------------------\n"
|
| 2110 |
)
|
| 2111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2112 |
app.queue(concurrency_count=511, max_size=1022).launch(share=True, quiet=False)
|
| 2113 |
#endregion
|
|
|
|
| 74 |
|
| 75 |
download_models()
|
| 76 |
|
| 77 |
+
print("\n-------------------------------\nRVC v2 Easy GUI\n-------------------------------\n")
|
| 78 |
|
| 79 |
def formant_apply(qfrency, tmbre):
|
| 80 |
Quefrency = qfrency
|
|
|
|
| 1480 |
return [f'./weights/{model}.pth', f'./logs/{model}/{log_file}'], "Done"
|
| 1481 |
else:
|
| 1482 |
return f'./weights/{model}.pth', "Could not find Index file."
|
| 1483 |
+
badges = """
|
| 1484 |
+
<div style="display: flex">
|
| 1485 |
+
<span style="margin-right: 5px">
|
| 1486 |
|
| 1487 |
+
[  ](https://discord.gg/aihubbrasil)
|
| 1488 |
+
|
| 1489 |
+
</span>
|
| 1490 |
+
<span style="margin-right: 5px">
|
| 1491 |
+
|
| 1492 |
+
[  ](https://twitter.com/GodoyEbert)
|
| 1493 |
+
|
| 1494 |
+
</span>
|
| 1495 |
+
<span>
|
| 1496 |
+
|
| 1497 |
+
[  ](https://github.com/rafaelGodoyEbert)
|
| 1498 |
+
|
| 1499 |
+
</span>
|
| 1500 |
+
<span>
|
| 1501 |
+
|
| 1502 |
+
[  ](https://discord.gg/aihub)
|
| 1503 |
+
|
| 1504 |
+
</span>
|
| 1505 |
+
</div>
|
| 1506 |
+
"""
|
| 1507 |
+
|
| 1508 |
+
description = """
|
| 1509 |
+
Increva-se no canal do <a href='https://www.youtube.com/@aihubbrasil' target='_blank'>Youtube do AI HUB Brasil</a> e no meu pessoal <a href='https://www.youtube.com/@godoyy' target='_blank'>Godoyy</a>
|
| 1510 |
+
"""
|
| 1511 |
+
|
| 1512 |
+
with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"), title="RVC - AI HUB BRASIL") as app:
|
| 1513 |
+
gr.Markdown(badges)
|
| 1514 |
+
gr.Markdown(description)
|
| 1515 |
+
|
| 1516 |
+
gr.HTML("<h1> Easy GUI | AI HUB BRASIL</h1>")
|
| 1517 |
with gr.Tabs():
|
| 1518 |
+
with gr.TabItem("Inference"):
|
| 1519 |
+
gr.HTML("<h10> Você pode encontrar mais modelos em AI Hub ou AI Hub Brasil </h10>")
|
|
|
|
|
|
|
| 1520 |
|
| 1521 |
# Inference Preset Row
|
| 1522 |
# with gr.Row():
|
|
|
|
| 1549 |
inputs=[sid0],
|
| 1550 |
outputs=[spk_item],
|
| 1551 |
)
|
| 1552 |
+
but0 = gr.Button("Converter", variant="primary")
|
| 1553 |
with gr.Row():
|
| 1554 |
with gr.Column():
|
| 1555 |
with gr.Row():
|
| 1556 |
+
dropbox = gr.File(label="Arraste seu arquivo de áudio e clique em atualizar.")
|
| 1557 |
with gr.Row():
|
| 1558 |
record_button=gr.Audio(source="microphone", label="Ou você pode usar seu microfone!", type="filepath")
|
| 1559 |
with gr.Row():
|
|
|
|
| 1594 |
|
| 1595 |
with gr.Column():
|
| 1596 |
vc_output2 = gr.Audio(
|
| 1597 |
+
label="Resultado final! (Clique nos três pontos para baixar o áudio)",
|
| 1598 |
type='filepath',
|
| 1599 |
interactive=False,
|
| 1600 |
)
|
|
|
|
| 1885 |
with gr.Row():
|
| 1886 |
status_bar=gr.Textbox(label="Status do download")
|
| 1887 |
download_button.click(fn=download_from_url, inputs=[url, model], outputs=[status_bar])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1888 |
|
| 1889 |
def has_two_files_in_pretrained_folder():
|
| 1890 |
pretrained_folder = "./pretrained/"
|
|
|
|
| 2128 |
|
| 2129 |
else:
|
| 2130 |
print(
|
| 2131 |
+
"Pesos pré-treinados não baixados. Desativando guia de treinamento.\n"
|
| 2132 |
+
"Quer saber como treinar uma voz? Junte-se ao servidor AI HUB no Discord!\nhttps://discord.gg/aihub ou https://discord.gg/aihubbrasil\n"
|
| 2133 |
"-------------------------------\n"
|
| 2134 |
)
|
| 2135 |
+
gr.Markdown("<h4> Huggingface port by Ilaria of the Rejekt Easy GUI </h4>")
|
| 2136 |
+
gr.Markdown(
|
| 2137 |
+
"""
|
| 2138 |
+
Feito com 💖 por Ilaria | Traduzido por Rafael Godoy | Suporte no servidor do Discord AI HUB Brasil ou Global
|
| 2139 |
+
"""
|
| 2140 |
+
)
|
| 2141 |
app.queue(concurrency_count=511, max_size=1022).launch(share=True, quiet=False)
|
| 2142 |
#endregion
|