Have the possibility to output audio in gr.Dataframe
Closed this issue · 3 comments
ylacombe commented
- I have searched to see if a similar issue already exists.
I currently want to create a demo where I associate some values to a wide range of audios, and it would be great if I could use gr.Dataframe with a column of audio samples, do you think it would be possible to have this ?
Many thanks!
freddyaboulton commented
Also related: #2678
freddyaboulton commented
And #8257 could be the patterned used to enable this I think
abidlabs commented
This is already possible actually, by setting the datatype="markdown"
in gr.DataFrame
!
Here's a representative example:
import gradio as gr
with gr.Blocks() as demo:
gr.DataFrame([["<audio src='/file=cantina.wav' controls></audio>"]], datatype="markdown")
demo.launch(allowed_paths=["cantina.wav"])
So I think we can close, but lmk if I'm missing anything!