chatbot / chat-2-interface.py
ghost717
gradio chatbot examples
c4ef1ac
raw
history blame
295 Bytes
import gradio as gr
# def greet(name):
# return "Hello " + name + "!!"
# demo = gr.Interface(fn=greet, inputs="text", outputs="text")
# demo.launch()
import random
def random_response(message, history):
return random.choice(["Yes", "No"])
gr.ChatInterface(random_response).launch()