Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -106,77 +106,66 @@ pic_markdown = ("""
|
|
106 |
<h1 align="center"><a href="https://wj.qq.com/s2/14160350/5f15/"><img src="https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/talktalkai-qrcode.png", alt="talktalkai-qrcode" border="0" style="margin: 0 auto; height: 320px;" /></a> </h1>
|
107 |
""")
|
108 |
|
109 |
-
def build_leaderboard_tab(leaderboard_table_file, show_plot=False):
|
110 |
-
if leaderboard_table_file:
|
111 |
-
data = load_leaderboard_table_csv(leaderboard_table_file)
|
112 |
-
model_table_df = pd.DataFrame(data)
|
113 |
-
|
114 |
-
gr.Markdown(title_markdown)
|
115 |
-
|
116 |
-
with gr.Tabs() as tabs:
|
117 |
-
# arena table
|
118 |
-
arena_table_vals = get_arena_table(model_table_df)
|
119 |
-
with gr.Tab("滔滔AI开源社区", id=0):
|
120 |
-
md = """
|
121 |
-
AI翻唱🎶:您可以在社区中复制您喜欢的AI歌手的“模型zip链接”,之后就可以在“[AI歌手全明星在线翻唱🌊](https://www.talktalkai.com/)”程序中通过粘贴zip链接来使用您喜欢的AI歌手模型啦访问滔滔AI开源社区\n
|
122 |
-
分享模型💕:您可以点击[此链接](https://wj.qq.com/s2/14160350/5f15/)或扫描网站下方二维码,填写并提交模型信息。我们会尽快将您分享的AI歌手模型添加至[滔滔AI](https://www.talktalkai.com/)开源社区中。感谢您的支持!
|
123 |
-
"""
|
124 |
-
gr.Markdown(md, elem_id="leaderboard_markdown")
|
125 |
-
gr.Dataframe(
|
126 |
-
headers=[
|
127 |
-
"排序",
|
128 |
-
"AI歌手名/AI Singer",
|
129 |
-
"模型zip链接/Link to Model Zip File",
|
130 |
-
"训练素材时长/Duration of Training Dataset(min)",
|
131 |
-
"训练epoch数/Epoch",
|
132 |
-
"模型贡献者/Model Contributor",
|
133 |
-
],
|
134 |
-
datatype=[
|
135 |
-
"str",
|
136 |
-
"markdown",
|
137 |
-
"str",
|
138 |
-
"number",
|
139 |
-
"number",
|
140 |
-
"str",
|
141 |
-
],
|
142 |
-
value=arena_table_vals,
|
143 |
-
elem_id="arena_leaderboard_dataframe",
|
144 |
-
height=800,
|
145 |
-
column_widths=[50, 100, 205, 95, 95, 95],
|
146 |
-
wrap=True,
|
147 |
-
)
|
148 |
-
else:
|
149 |
-
pass
|
150 |
-
|
151 |
-
gr.Markdown(pic_markdown)
|
152 |
-
gr.Markdown("###### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</center>")
|
153 |
-
gr.Markdown("###### <center>请自觉合规使用此程序,程序开发者不负有任何责任。感谢[OpenXLab](https://openxlab.org.cn/home)社区的算力支持!💕</center>")
|
154 |
-
|
155 |
-
gr.HTML('''
|
156 |
-
<div class="footer">
|
157 |
-
<p>🌊🏞️🎶 - 江水东流急,滔滔无尽声。 明·顾璘
|
158 |
-
</p>
|
159 |
-
</div>
|
160 |
-
''')
|
161 |
-
|
162 |
-
def build_demo(leaderboard_table_file):
|
163 |
-
text_size = gr.themes.sizes.text_lg
|
164 |
-
|
165 |
-
with gr.Blocks(
|
166 |
-
title="OCRBench Leaderboard",
|
167 |
-
theme=gr.themes.Base(text_size=text_size),
|
168 |
-
css=block_css,
|
169 |
-
) as demo:
|
170 |
-
leader_components = build_leaderboard_tab(
|
171 |
-
leaderboard_table_file, show_plot=True
|
172 |
-
)
|
173 |
-
return demo
|
174 |
-
|
175 |
-
if __name__ == "__main__":
|
176 |
-
parser = argparse.ArgumentParser()
|
177 |
-
parser.add_argument("--share", action="store_true")
|
178 |
-
parser.add_argument("--OCRBench_file", type=str, default="./OCRBench.csv")
|
179 |
-
args = parser.parse_args()
|
180 |
|
181 |
-
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
<h1 align="center"><a href="https://wj.qq.com/s2/14160350/5f15/"><img src="https://download.openxlab.org.cn/models/Kevin676/rvc-models/weight/talktalkai-qrcode.png", alt="talktalkai-qrcode" border="0" style="margin: 0 auto; height: 320px;" /></a> </h1>
|
107 |
""")
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
+
data = load_leaderboard_table_csv("./OCRBench.csv")
|
111 |
+
model_table_df = pd.DataFrame(data)
|
112 |
+
|
113 |
+
|
114 |
+
text_size = gr.themes.sizes.text_lg
|
115 |
+
|
116 |
+
with gr.Blocks(
|
117 |
+
title="OCRBench Leaderboard",
|
118 |
+
theme=gr.themes.Base(text_size=text_size),
|
119 |
+
css=block_css,
|
120 |
+
) as demo:
|
121 |
+
|
122 |
+
gr.Markdown(title_markdown)
|
123 |
+
|
124 |
+
with gr.Tabs() as tabs:
|
125 |
+
# arena table
|
126 |
+
arena_table_vals = get_arena_table(model_table_df)
|
127 |
+
with gr.Tab("滔滔AI开源社区", id=0):
|
128 |
+
md = """
|
129 |
+
AI翻唱🎶:您可以在社区中复制您喜欢的AI歌手的“模型zip链接”,之后就可以在“[AI歌手全明星在线翻唱🌊](https://www.talktalkai.com/)”程序中通过粘贴zip链接来使用您喜欢的AI歌手模型啦访问滔滔AI开源社区\n
|
130 |
+
分享模型💕:您可以点击[此链接](https://wj.qq.com/s2/14160350/5f15/)或扫描网站下方二维码,填写并提交模型信息。我们会尽快将您分享的AI歌手模型添加至[滔滔AI](https://www.talktalkai.com/)开源社区中。感谢您的支持!
|
131 |
+
"""
|
132 |
+
gr.Markdown(md, elem_id="leaderboard_markdown")
|
133 |
+
gr.Dataframe(
|
134 |
+
headers=[
|
135 |
+
"排序",
|
136 |
+
"AI歌手名/AI Singer",
|
137 |
+
"模型zip链接/Link to Model Zip File",
|
138 |
+
"训练素材时长/Duration of Training Dataset(min)",
|
139 |
+
"训练epoch数/Epoch",
|
140 |
+
"模型贡献者/Model Contributor",
|
141 |
+
],
|
142 |
+
datatype=[
|
143 |
+
"str",
|
144 |
+
"markdown",
|
145 |
+
"str",
|
146 |
+
"number",
|
147 |
+
"number",
|
148 |
+
"str",
|
149 |
+
],
|
150 |
+
value=arena_table_vals,
|
151 |
+
elem_id="arena_leaderboard_dataframe",
|
152 |
+
height=800,
|
153 |
+
column_widths=[50, 100, 205, 95, 95, 95],
|
154 |
+
wrap=True,
|
155 |
+
)
|
156 |
+
|
157 |
+
|
158 |
+
gr.Markdown(pic_markdown)
|
159 |
+
gr.Markdown("###### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</center>")
|
160 |
+
gr.Markdown("###### <center>请自觉合规使用此程序,程序开发者不负有任何责任。感谢[OpenXLab](https://openxlab.org.cn/home)社区的算力支持!💕</center>")
|
161 |
+
|
162 |
+
gr.HTML('''
|
163 |
+
<div class="footer">
|
164 |
+
<p>🌊🏞️🎶 - 江水东流急,滔滔无尽声。 明·顾璘
|
165 |
+
</p>
|
166 |
+
</div>
|
167 |
+
''')
|
168 |
+
|
169 |
+
|
170 |
+
|
171 |
+
demo.launch()
|