Spaces:
Sleeping
Sleeping
feat(app.py): add check and modify 'Download Model' tab footer text
Browse files
app.py
CHANGED
@@ -44,15 +44,16 @@ except (ValueError, TypeError, IndexError):
|
|
44 |
DoFormant, Quefrency, Timbre = False, 1.0, 1.0
|
45 |
CSVutil('csvdb/formanting.csv', 'w+', 'formanting', DoFormant, Quefrency, Timbre)
|
46 |
|
47 |
-
# Download hubert base model
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
56 |
|
57 |
print("\n-------------------------------\nRVC v2 Easy GUI (Local Edition)\n-------------------------------\n")
|
58 |
|
@@ -1816,11 +1817,10 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
1816 |
with gr.Row():
|
1817 |
gr.Markdown(
|
1818 |
"""
|
1819 |
-
Made with ❤️ by [Alice Oliveira](https://github.com/aliceoq)
|
1820 |
-
Hosted with ❤️ by [Mateus Elias](https://github.com/mateuseap)
|
1821 |
"""
|
1822 |
)
|
1823 |
-
|
1824 |
def has_two_files_in_pretrained_folder():
|
1825 |
pretrained_folder = "./pretrained/"
|
1826 |
if not os.path.exists(pretrained_folder):
|
|
|
44 |
DoFormant, Quefrency, Timbre = False, 1.0, 1.0
|
45 |
CSVutil('csvdb/formanting.csv', 'w+', 'formanting', DoFormant, Quefrency, Timbre)
|
46 |
|
47 |
+
# Download hubert base model if not present
|
48 |
+
if not os.path.isfile('./hubert_base.pt'):
|
49 |
+
response = requests.get('https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt')
|
50 |
+
|
51 |
+
if response.status_code == 200:
|
52 |
+
with open('./hubert_base.pt', 'wb') as f:
|
53 |
+
f.write(response.content)
|
54 |
+
print("Downloaded hubert base model file successfully. File saved to ./hubert_base.pt.")
|
55 |
+
else:
|
56 |
+
raise Exception("Failed to download hubert base model file. Status code: " + str(response.status_code) + ".")
|
57 |
|
58 |
print("\n-------------------------------\nRVC v2 Easy GUI (Local Edition)\n-------------------------------\n")
|
59 |
|
|
|
1817 |
with gr.Row():
|
1818 |
gr.Markdown(
|
1819 |
"""
|
1820 |
+
Made with ❤️ by [Alice Oliveira](https://github.com/aliceoq) | Hosted with ❤️ by [Mateus Elias](https://github.com/mateuseap)
|
|
|
1821 |
"""
|
1822 |
)
|
1823 |
+
|
1824 |
def has_two_files_in_pretrained_folder():
|
1825 |
pretrained_folder = "./pretrained/"
|
1826 |
if not os.path.exists(pretrained_folder):
|