Spaces:
Sleeping
Sleeping
feat(app.py): create download_models() function
Browse files43 unmodified lines4445464748495051525354555657585943 unmodified linesDoFormant, Quefrency, Timbre = False, 1.0, 1.0CSVutil('csvdb/formanting.csv', 'w+', 'formanting', DoFormant, Quefrency, Timbre)# Download hubert base model if not presentif not os.path.isfile('./hubert_base.pt'):response = requests.get('https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt')if response.status_code == 200:with open('./hubert_base.pt', 'wb') as f:f.write(response.content)print("Downloaded hubert base model file successfully. File saved to ./hubert_base.pt.")else:raise Exception("Failed to download hubert base model file. Status code: " + str(response.status_code) + ".")print("\n-------------------------------\nRVC v2 Easy GUI (Local Edition)\n-------------------------------\n")43 unmodified lines44454647484950515253545556575859606162636465666768697071727343 unmodified linesDoFormant, Quefrency, Timbre = False, 1.0, 1.0CSVutil('csvdb/formanting.csv', 'w+', 'formanting', DoFormant, Quefrency, Timbre)def download_models():# Download hubert base model if not presentif not os.path.isfile('./hubert_base.pt'):response = requests.get('https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt')if response.status_code == 200:with open('./hubert_base.pt', 'wb') as f:f.write(response.content)print("Downloaded hubert base model file successfully. File saved to ./hubert_base.pt.")else:raise Exception("Failed to download hubert base model file. Status code: " + str(response.status_code) + ".")# Download rmvpe model if not presentif not os.path.isfile('./rmvpe.pt'):response = requests.get('https://drive.usercontent.google.com/download?id=1Hkn4kNuVFRCNQwyxQFRtmzmMBGpQxptI&export=download&authuser=0&confirm=t&uuid=0b3a40de-465b-4c65-8c41-135b0b45c3f7&at=APZUnTV3lA3LnyTbeuduura6Dmi2:1693724254058')if response.status_code == 200:with open('./rmvpe.pt', 'wb') as f:f.write(response.content)print("Downloaded hubert base model file successfully. File saved to ./rmvpe.pt.")else:raise Exception("Failed to download hubert base model file. Status code: " + str(response.status_code) + ".")download_models()print("\n-------------------------------\nRVC v2 Easy GUI (Local Edition)\n-------------------------------\n")
app.py+24-10