import gradio as gr def chat_fn(message): # Example response logic (or use a real model) if "capital of Germany" in message.lower(): return "Berlin" return "I'm not sure, but I can try to help!" iface = gr.Interface(fn=chat_fn, inputs="text", outputs="text") iface.launch()