Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|