Spaces:
Sleeping
Sleeping
added randomizer for responses
Browse files123344567896101112import gradio as grimport random
def echo(message, history): return messagedef random_message(message, history): choices = ["yes", "no"] #use random to select one of those choices chat_answer = random.choice(choices) return chat_answer chatbot = gr.ChatInterface(echo, type = "messages")chatbot = gr.ChatInterface(random_message, type = "messages")
chatbot.launch()app.py+7-3