test-ci / app.py
abidlabs's picture
abidlabs HF Staff
Create app.py
b84fd5f verified
raw
history blame contribute delete
570 Bytes
import gradio as gr
def fake(message, history):
if message.strip():
return {
"role": "assistant",
"content": {
"path": "https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav"
}
}
else:
return "Please provide the name of an artist"
gr.ChatInterface(
fake,
type="messages",
textbox=gr.Textbox(placeholder="Which artist's music do you want to listen to?", scale=7),
chatbot=gr.Chatbot(placeholder="Play music by any artist!"),
).launch()