test-chat-share / app.py
abidlabs's picture
abidlabs HF Staff
Update app.py
66319e8
raw
history blame contribute delete
372 Bytes
import gradio as gr
code = """
abc
```py
def test(x):
return x
```
"""
def generate(x):
return [
(f"abc ![](/file={x}) klm ![](/file={x})", "def"),
("ghi", "jkl"),
(f"abc ![](/file={x}) klm", "def"),
]
with gr.Blocks() as demo:
i = gr.Image(type="filepath")
c = gr.Chatbot()
i.change(generate, i, c)
demo.launch()