Spaces:
Sleeping
Sleeping
Added in random message (yes/no)
Browse files1234567import gradio as grdef echo(message, history):return messagechatbot = gr.ChatInterface(echo)chatbot.launch()123456789import gradio as grimport randomdef random_response(message, history):response_options = ["yes", "no"]return random.choice(response_options) # random.choice is a function from the random librarychatbot = gr.ChatInterface(random_response)chatbot.launch()
app.py+5-3