Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| # Simple echo chatbot | |
| def respond(message, history=[]): | |
| # Append user message to history | |
| history.append((message, "")) | |
| # Simple echo: bot replies with the same message | |
| reply = f"You said: {message}" | |
| history[-1] = (message, reply) | |
| return None, history | |
| # Create Gradio interface | |
| iface = gr.ChatInterface(fn=respond, title="Hello World Chatbot", description="A simple echo chatbot.") | |
| if __name__ == "__main__": | |
| iface.launch() | |