# app.py import gradio as gr def chatbot_response(message): # Simple response logic responses = { "book a hotel": "Sure! What date and location?", "check availability": "Let me check the availability...", "hotel pricing": "Here are the pricing options...", } return responses.get(message.lower(), "Sorry, I didn't understand that.") with gr.Blocks() as chatbot: gr.Markdown("# Hotel Booking Chatbot") with gr.Row(): message_input = gr.Textbox(label="Your Message") with gr.Row(): submit_button = gr.Button("Send") with gr.Row(): output = gr.Textbox(label="Chatbot Response") submit_button.click(chatbot_response, inputs=message_input, outputs=output) chatbot.launch()