Update app.py
Browse files20 unmodified lines21222324252624252829303132333426272829303132333435363738414243394041424748494344454647482 unmodified lines515253545556576158596020 unmodified lines gr.Markdown("# Chatbot Interface")
# Define the chat interface with gr.Row(): # Chatbot component chatbot_component = gr.Chatbot(type="messages", label="Chat History", height=500) chatbot_component = gr.Chatbot(type="messages", label="Chat History", height=500)
with gr.Row(): # Container for input and send button with gr.Box(elem_id="input_container"): user_input = gr.Textbox( placeholder="Type your message here...", label=None, lines=1, elem_id="user_input" ) send_button = gr.Button("📤", elem_id="send_button") with gr.Row(elem_id="input_container"): # Input field user_input = gr.Textbox( placeholder="Type your message here...", label=None, lines=1, elem_id="user_input" ) # Send button send_button = gr.Button("📤", elem_id="send_button") # Add CSS for styling the input container and placing the button inside demo.css = """ #input_container { display: flex; align-items: center; border: 1px solid #ccc; border-radius: 8px; padding: 5px; gap: 5px; } #user_input { flex-grow: 1; border: none; outline: none; padding: 8px; border: 1px solid #ccc; border-radius: 8px; padding: 10px; } #send_button { width: 40px;2 unmodified lines color: white; border: none; border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; cursor: pointer; } #send_button:hover { background-color: #0056b3;app.py+13-17