File size: 507 Bytes
f4174c2
 
7f5276b
 
f4174c2
 
 
7f5276b
f4174c2
 
7f5276b
f4174c2
7f5276b
f4174c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# This is a simple Gradio app that creates a chat interface with a random response function.
import random
import gradio as gr

# Define a function that takes a message and history, and returns a random response.
def random_response(message, history):
    return random.choice(["Yes", "No"])

# Create a Gradio ChatInterface that uses the random_response function.
demo = gr.ChatInterface(random_response, type="messages")

# Launch the interface.
if __name__ == "__main__":
    demo.launch(show_error=True)