Spaces:
Runtime error
Runtime error
Commit
·
bf2e3a2
1
Parent(s):
90f67b7
Update app.py
Browse files
app.py
CHANGED
@@ -1358,9 +1358,9 @@ def download_from_url(url, model):
|
|
1358 |
shutil.copy(file_path,f'./weights/{model}.pth')
|
1359 |
shutil.rmtree("zips")
|
1360 |
shutil.rmtree("unzips")
|
1361 |
-
return "
|
1362 |
except:
|
1363 |
-
return "
|
1364 |
def success_message(face):
|
1365 |
return f'{face.name} has been uploaded.', 'None'
|
1366 |
def mouth(size, face, voice, faces):
|
@@ -1472,9 +1472,9 @@ def zip_downloader(model):
|
|
1472 |
|
1473 |
with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
1474 |
with gr.Tabs():
|
1475 |
-
with gr.TabItem("
|
1476 |
gr.HTML("<h1> Ilaria RVC 2.0 💖 </h1>")
|
1477 |
-
gr.HTML("<h10>
|
1478 |
gr.HTML("<h4> Sostieni Ilaria su Ko-Fi donando qualsiasi somma: https://ko-fi.com/ilariaowo </h4>")
|
1479 |
|
1480 |
# Inference Preset Row
|
@@ -1488,7 +1488,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
1488 |
# Other RVC stuff
|
1489 |
with gr.Row():
|
1490 |
sid0 = gr.Dropdown(label="1.Scegli il modello.", choices=sorted(names), value=check_for_name())
|
1491 |
-
refresh_button = gr.Button("
|
1492 |
if check_for_name() != '':
|
1493 |
get_vc(sorted(names)[0])
|
1494 |
vc_transform0 = gr.Number(label="Pitch: 0 da uomo a uomo (o donna a donna); 12 da uomo a donna e -12 da donna a uomo", value=0)
|
@@ -1523,7 +1523,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
1523 |
)
|
1524 |
dropbox.upload(fn=save_to_wav2, inputs=[dropbox], outputs=[input_audio0])
|
1525 |
dropbox.upload(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
1526 |
-
refresh_button2 = gr.Button("
|
1527 |
record_button.change(fn=save_to_wav, inputs=[record_button], outputs=[input_audio0])
|
1528 |
record_button.change(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
1529 |
with gr.Row():
|
@@ -1581,9 +1581,9 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
1581 |
interactive=False,
|
1582 |
)
|
1583 |
animate_button.click(fn=mouth, inputs=[size, face, vc_output2, faces], outputs=[animation, preview])
|
1584 |
-
with gr.Accordion("
|
1585 |
f0method0 = gr.Radio(
|
1586 |
-
label="
|
1587 |
choices=["pm", "dio", "crepe-tiny", "mangio-crepe-tiny", "crepe", "harvest", "mangio-crepe", "rmvpe"], # Fork Feature. Add Crepe-Tiny
|
1588 |
value="rmvpe",
|
1589 |
interactive=True,
|
@@ -1821,19 +1821,19 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
1821 |
[vc_output3],
|
1822 |
)
|
1823 |
but1.click(fn=lambda: easy_uploader.clear())
|
1824 |
-
with gr.TabItem("
|
1825 |
with gr.Row():
|
1826 |
-
url=gr.Textbox(label="
|
1827 |
with gr.Row():
|
1828 |
-
model = gr.Textbox(label="
|
1829 |
-
download_button=gr.Button("
|
1830 |
with gr.Row():
|
1831 |
status_bar=gr.Textbox(label="")
|
1832 |
download_button.click(fn=download_from_url, inputs=[url, model], outputs=[status_bar])
|
1833 |
with gr.Row():
|
1834 |
gr.Markdown(
|
1835 |
"""
|
1836 |
-
Made with
|
1837 |
"""
|
1838 |
)
|
1839 |
|
|
|
1358 |
shutil.copy(file_path,f'./weights/{model}.pth')
|
1359 |
shutil.rmtree("zips")
|
1360 |
shutil.rmtree("unzips")
|
1361 |
+
return "Modello scaricato con successo, puoi tornare all'inferenza."
|
1362 |
except:
|
1363 |
+
return "Errore, il modello non si è scaricato correttamente."
|
1364 |
def success_message(face):
|
1365 |
return f'{face.name} has been uploaded.', 'None'
|
1366 |
def mouth(size, face, voice, faces):
|
|
|
1472 |
|
1473 |
with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
1474 |
with gr.Tabs():
|
1475 |
+
with gr.TabItem("Inferenza"):
|
1476 |
gr.HTML("<h1> Ilaria RVC 2.0 💖 </h1>")
|
1477 |
+
gr.HTML("<h10> Lista dei modelli a cura di Ilaria: https://rentry.org/modelli-italiani </h10>")
|
1478 |
gr.HTML("<h4> Sostieni Ilaria su Ko-Fi donando qualsiasi somma: https://ko-fi.com/ilariaowo </h4>")
|
1479 |
|
1480 |
# Inference Preset Row
|
|
|
1488 |
# Other RVC stuff
|
1489 |
with gr.Row():
|
1490 |
sid0 = gr.Dropdown(label="1.Scegli il modello.", choices=sorted(names), value=check_for_name())
|
1491 |
+
refresh_button = gr.Button("Aggiorna", variant="primary")
|
1492 |
if check_for_name() != '':
|
1493 |
get_vc(sorted(names)[0])
|
1494 |
vc_transform0 = gr.Number(label="Pitch: 0 da uomo a uomo (o donna a donna); 12 da uomo a donna e -12 da donna a uomo", value=0)
|
|
|
1523 |
)
|
1524 |
dropbox.upload(fn=save_to_wav2, inputs=[dropbox], outputs=[input_audio0])
|
1525 |
dropbox.upload(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
1526 |
+
refresh_button2 = gr.Button("Aggiorna", variant="primary", size='sm')
|
1527 |
record_button.change(fn=save_to_wav, inputs=[record_button], outputs=[input_audio0])
|
1528 |
record_button.change(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
1529 |
with gr.Row():
|
|
|
1581 |
interactive=False,
|
1582 |
)
|
1583 |
animate_button.click(fn=mouth, inputs=[size, face, vc_output2, faces], outputs=[animation, preview])
|
1584 |
+
with gr.Accordion("Opzioni avanzate", open=False):
|
1585 |
f0method0 = gr.Radio(
|
1586 |
+
label="Opzionale: Cambia il meteodo di estrazione del pitch.\nIlaria consiglia di lasciare tutto così com'è.\nrmvpe è il miglior metodo, in caso di problemi potete provare anche mangio-crepe.",
|
1587 |
choices=["pm", "dio", "crepe-tiny", "mangio-crepe-tiny", "crepe", "harvest", "mangio-crepe", "rmvpe"], # Fork Feature. Add Crepe-Tiny
|
1588 |
value="rmvpe",
|
1589 |
interactive=True,
|
|
|
1821 |
[vc_output3],
|
1822 |
)
|
1823 |
but1.click(fn=lambda: easy_uploader.clear())
|
1824 |
+
with gr.TabItem("Scarica modelli"):
|
1825 |
with gr.Row():
|
1826 |
+
url=gr.Textbox(label="Inserisci l'URL del modello:")
|
1827 |
with gr.Row():
|
1828 |
+
model = gr.Textbox(label="Nome del modello (senza spazi):")
|
1829 |
+
download_button=gr.Button("Scarica")
|
1830 |
with gr.Row():
|
1831 |
status_bar=gr.Textbox(label="")
|
1832 |
download_button.click(fn=download_from_url, inputs=[url, model], outputs=[status_bar])
|
1833 |
with gr.Row():
|
1834 |
gr.Markdown(
|
1835 |
"""
|
1836 |
+
Made with 💖 by Ilaria | Sostieni Ilaria su [Ko-Fi](https://ko-fi.com/ilariaowo)
|
1837 |
"""
|
1838 |
)
|
1839 |
|