Spaces:
Runtime error
Runtime error
| 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() | |