ysharma's picture
ysharma HF Staff
Update app.py
4f87f94 verified
raw
history blame
1.39 kB
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()