Spaces:
Sleeping
Sleeping
File size: 1,007 Bytes
7a6a652 30d16b6 7a6a652 fcb84b9 7a6a652 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
import pandas as pd
import gradio as gr
csv_link = "https://huggingface.co/datasets/jerpint/vox-cloned-data/resolve/main/metadata.csv?download=true"
models = ["commonvoice", "xttsv2", "stylettsv2", "elevenlabs", "playht", "metavoice", "metavoice-extended"]
def audio_markdown(x, model: str):
link = f"https://huggingface.co/datasets/jerpint/vox-cloned-data/resolve/main/{model}/{x.path}?download=true"
audio_md = f"""<audio controls>
<source src="{link}" type="audio/mpeg">
Your browser does not support the audio element.
</audio>"""
return audio_md
df = pd.read_csv(csv_link)
for model in models:
df[model] = df.apply(lambda x: audio_markdown(x, model), axis=1)
with gr.Blocks() as demo:
gr.Dataframe(
value=df[
[
*models,
"path",
"sentence",
"gender",
"accents",
]
],
datatype="markdown",
row_count=10,
)
demo.launch() |