import gradio as gr | |
def chat_interface(user_input): | |
# Call the model to generate a response based on user input | |
response = "Model response for user input: " + user_input | |
return response | |
chat_input = gr.inputs.Textbox(lines=2, label="Enter your message") | |
chat_output = gr.outputs.Textbox(label="Model Response") | |
gr.Interface.fn(chat_interface, inputs=chat_input, outputs=chat_output).launch() |