File size: 1,391 Bytes
86055e1
 
 
 
 
 
4f87f94
 
d438aa9
 
 
 
 
 
86055e1
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr

def echo(message, history):
    return message["text"]

demo = gr.ChatInterface(fn=echo, 
                        examples=[{"text": "hello", "files":["https://miro.medium.com/v2/resize:fit:930/1*OaV5eb_DRNIJQal_B7-YDQ.jpeg"]}, 
                                  {"text": "hola", "files":["https://miro.medium.com/v2/resize:fit:930/1*OaV5eb_DRNIJQal_B7-YDQ.jpeg"]}, 
                                  {"text": "merhaba", "files":["https://miro.medium.com/v2/resize:fit:930/1*OaV5eb_DRNIJQal_B7-YDQ.jpeg"]}, 
                                  {"text": "ok", "files":["https://www.gradio.app/_app/immutable/assets/header-image.DJQS6l6U.jpg"]}, 
                                  {"text": "Why?", "files":["https://miro.medium.com/v2/da:true/resize:fit:1024/1*iJArJfAGlqMj7Uz7OU-Hdw.gif"]}, 
                                  {"text": "great!", "files":["https://digitalpress.fra1.cdn.digitaloceanspaces.com/mhujhsj/2022/09/seaborn.gif"]}, 
                                  {"text": "Now!", "files":["https://user-images.githubusercontent.com/1778297/158659207-04015a06-5cad-4ee1-bdbd-291054551540.png"]}, 
                                  {"text": "Cool", "files":["https://user-images.githubusercontent.com/1778297/158659207-04015a06-5cad-4ee1-bdbd-291054551540.png"]}], 
                        title="Echo Bot", 
                        multimodal=True)
demo.launch()