hysts's picture
hysts HF staff
Add files
5f03826
raw
history blame contribute delete
523 Bytes
import time
import gradio as gr
def bot(message, history):
out = []
for word in "This is a test.".split():
out.append(word)
time.sleep(1)
yield " ".join(out)
examples = [
{
"text": "hey",
"files": ["cats.jpg", "dogs.jpg"],
},
]
demo = gr.ChatInterface(
fn=bot,
multimodal=True,
textbox=gr.MultimodalTextbox(
file_types=["image"],
file_count="multiple",
),
examples=examples,
cache_examples=False,
)
demo.queue().launch()