Download app.py from hysts-debug/multimodal-chat-cache-examples: direct link, hf CLI and curl.
- Browser
- Download file 291 Bytes
-
https://huggingface.co/spaces/hysts-debug/multimodal-chat-cache-examples/resolve/main/app.py
- Command line
-
hf download hf://spaces/hysts-debug/multimodal-chat-cache-examples/app.py
-
curl -L -o app.py https://huggingface.co/spaces/hysts-debug/multimodal-chat-cache-examples/resolve/main/app.py
291 Bytes
| import gradio as gr | |
| def run(message, history): | |
| return message["text"] | |
| examples = [ | |
| { | |
| "text": "hey", | |
| "files": ["cats.jpg"], | |
| }, | |
| ] | |
| demo = gr.ChatInterface( | |
| fn=run, | |
| multimodal=True, | |
| examples=examples, | |
| cache_examples=True, | |
| ) | |
| demo.queue().launch() | |