abidlabs HF staff commited on
Commit
ee27d13
1 Parent(s): f80d0aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -1,11 +1,13 @@
1
  import gradio as gr
2
 
3
- with gr.Blocks() as demo:
4
- gr.Chatbot(value=[["hey", "hi"], ["hey", "hi"]])
5
- gr.Chatbot(value=[
6
- {"role": "assistant", "content": "How can I help?"},
7
- {"role": "user", "content": "Save me"},
8
- {"role": "user", "content": gr.Image("https://en.wikipedia.org/static/images/icons/wikipedia.png")},
9
- ], type="messages")
10
 
11
- demo.launch()
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ def echo(message, history):
4
+ return message["text"]
 
 
 
 
 
5
 
6
+ demo = gr.ChatInterface(
7
+ fn=echo,
8
+ type="messages",
9
+ examples=[{"text": "hello"}, {"text": "hola"}, {"text": "merhaba"}],
10
+ title="Echo Bot",
11
+ multimodal=True,
12
+ )
13
+ demo.launch()