File size: 296 Bytes
1d3f41c
 
ae2c48f
519e145
 
ae2c48f
 
1d3f41c
ae2c48f
 
1
2
3
4
5
6
7
8
9
10
11
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()