Pratap1928 commited on
Commit
3a08a2f
1 Parent(s): a865f21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -1,20 +1,13 @@
1
  import gradio as gr
2
 
3
- def chat_bot(message, history):
4
- return f"{message} + is correct."
 
 
 
5
 
6
- demo = gr.ChatInterface(
7
- chat_bot,
8
- title = "ChatBot",
9
- description = "Ask me anything",
10
- theme=gr.themes.Monochrome(),
11
- additional_inputs=[
12
- gr.Textbox("You are helpful AI.", label="System Prompt"),
13
- gr.Slider(10, 100),
14
- examples = ["He is handsome", "Apple is red in colour"],
15
- ],
16
-
17
- )
18
-
19
- demo.launch()
20
-
 
1
  import gradio as gr
2
 
3
+ def fake(message, history):
4
+ if message.strip():
5
+ return gr.Audio("https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav")
6
+ else:
7
+ return "Please provide the name of an artist"
8
 
9
+ gr.ChatInterface(
10
+ fake,
11
+ textbox=gr.Textbox(placeholder="Which artist's music do you want to listen to?", scale=7),
12
+ chatbot=gr.Chatbot(placeholder="Play music by any artist!"),
13
+ ).launch()