File size: 431 Bytes
5bc6e65 4ae3721 5bc6e65 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
def greet(name):
return "Hello " + name + "!!"
def chat(name, message):
return "Hello " + name + "! You said: " + message
iface = gr.Interface(fn=chat, inputs=["text", "text"], outputs="text")
# Add a text window where the user and the bot can chat
text_window = gr.outputs.Text(label="Chat")
# Update the interface to include the text window
iface = iface.with_output(text_window)
iface.launch()
|