Spaces:
Runtime error
Runtime error
kevinwang676
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -108,9 +108,19 @@ def get_username(url):
|
|
108 |
result = match_username.group(1)
|
109 |
return result
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
def download_online_model(url, dir_name):
|
112 |
if url.startswith('https://download.openxlab.org.cn/models/'):
|
113 |
zip_path = get_username(url) + "-" + get_file_name(url)
|
|
|
|
|
114 |
else:
|
115 |
zip_path = get_file_name(url)
|
116 |
if not os.path.exists(zip_path):
|
@@ -495,7 +505,7 @@ with app:
|
|
495 |
* Blackpink Lisa: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/Lisa.zip
|
496 |
* AI派蒙: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/paimon.zip
|
497 |
* AI孙燕姿: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/syz.zip
|
498 |
-
* AI[一清清清](https://www.bilibili.com/video/BV1wV411u74P)(推荐使用[
|
499 |
说明1:点击“一键开启AI翻唱之旅吧!”按钮即可使用!✨\n
|
500 |
说明2:一般情况下,男声演唱的歌曲转换成AI女声演唱需要升调,反之则需要降调;在“歌曲人声升降调”模块可以调整\n
|
501 |
说明3:对于同一个AI歌手模型或者同一首歌曲,第一次的运行时间会比较长(大约1分钟),请您耐心等待;之后的运行时间会大大缩短哦!\n
|
@@ -534,7 +544,7 @@ with app:
|
|
534 |
gr.Markdown("# <center>🌊💕🎶 TalkTalkAI - Best AI song cover generator ever</center>")
|
535 |
gr.Markdown("## <center>🌟 Provide the name of a song and our application running on A100 will handle everything else!</center>")
|
536 |
gr.Markdown("### <center>🤗 [TalkTalkAI](http://www.talktalkai.com/), let everyone enjoy a better life through human-centered AI💕</center>")
|
537 |
-
with gr.Accordion("💡 Some AI singers you can
|
538 |
_ = f""" Any Zip file that you can download online will be fine (The Zip file should contain .pth and .index files):
|
539 |
* AI Taylor Swift: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/taylor.zip
|
540 |
* AI Blackpink Lisa: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/Lisa.zip
|
|
|
108 |
result = match_username.group(1)
|
109 |
return result
|
110 |
|
111 |
+
# Get username in Hugging Facew
|
112 |
+
|
113 |
+
def get_username_hf(url):
|
114 |
+
match_username = re.search(r'huggingface.co/(.*?)/', url)
|
115 |
+
if match_username:
|
116 |
+
result = match_username.group(1)
|
117 |
+
return result
|
118 |
+
|
119 |
def download_online_model(url, dir_name):
|
120 |
if url.startswith('https://download.openxlab.org.cn/models/'):
|
121 |
zip_path = get_username(url) + "-" + get_file_name(url)
|
122 |
+
elif url.startswith('https://huggingface.co/'):
|
123 |
+
zip_path = get_username_hf(url) + "-" + get_file_name(url)
|
124 |
else:
|
125 |
zip_path = get_file_name(url)
|
126 |
if not os.path.exists(zip_path):
|
|
|
505 |
* Blackpink Lisa: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/Lisa.zip
|
506 |
* AI派蒙: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/paimon.zip
|
507 |
* AI孙燕姿: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/syz.zip
|
508 |
+
* AI[一清清清](https://www.bilibili.com/video/BV1wV411u74P)(推荐使用 [Hugging Face](https://huggingface.co/new) 存放模型zip压缩包): https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/yiqing.zip\n
|
509 |
说明1:点击“一键开启AI翻唱之旅吧!”按钮即可使用!✨\n
|
510 |
说明2:一般情况下,男声演唱的歌曲转换成AI女声演唱需要升调,反之则需要降调;在“歌曲人声升降调”模块可以调整\n
|
511 |
说明3:对于同一个AI歌手模型或者同一首歌曲,第一次的运行时间会比较长(大约1分钟),请您耐心等待;之后的运行时间会大大缩短哦!\n
|
|
|
544 |
gr.Markdown("# <center>🌊💕🎶 TalkTalkAI - Best AI song cover generator ever</center>")
|
545 |
gr.Markdown("## <center>🌟 Provide the name of a song and our application running on A100 will handle everything else!</center>")
|
546 |
gr.Markdown("### <center>🤗 [TalkTalkAI](http://www.talktalkai.com/), let everyone enjoy a better life through human-centered AI💕</center>")
|
547 |
+
with gr.Accordion("💡 Some AI singers you can play with", open=False):
|
548 |
_ = f""" Any Zip file that you can download online will be fine (The Zip file should contain .pth and .index files):
|
549 |
* AI Taylor Swift: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/taylor.zip
|
550 |
* AI Blackpink Lisa: https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/Lisa.zip
|