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