Spaces:
Sleeping
Sleeping
Update app.py
Browse files123456789101112import gradio as gr# first, add your import linesdef echo(message, history):return message# Code the function that your chatbot will run!print("Hello world")chatbot = gr.ChatInterface(echo, type="messages")# Use gradio to create an interface where your user can use ChatInterface --> needs a function as a parameter to runchatbot.launch()12345678910111213141516import gradio as grimport random# first, add your import linesdef yes_or_no(message, history):responses = ["Yes", "No"]return responses.choice(responses)# def echo(message, history):# return message# Code the function that your chatbot will run!print("Hello world")chatbot = gr.ChatInterface(yes_or_no, type="messages")# Use gradio to create an interface where your user can use ChatInterface --> needs a function as a parameter to runchatbot.launch()
app.py+7-3