Update app.py
Browse files
app.py
CHANGED
|
@@ -29,10 +29,24 @@ def create_chat_interface():
|
|
| 29 |
# Textbox for user input
|
| 30 |
with gr.Column(scale=0.9):
|
| 31 |
user_input = gr.Textbox(placeholder="Type your message here...", label="Your Input", lines=1)
|
| 32 |
-
#
|
| 33 |
with gr.Column(scale=0.1):
|
| 34 |
-
send_button = gr.Button("📤", elem_id="send_button"
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
# Connect the input to the chatbot function via the Send button
|
| 37 |
send_button.click(
|
| 38 |
chatbot,
|
|
|
|
| 29 |
# Textbox for user input
|
| 30 |
with gr.Column(scale=0.9):
|
| 31 |
user_input = gr.Textbox(placeholder="Type your message here...", label="Your Input", lines=1)
|
| 32 |
+
# Square send button
|
| 33 |
with gr.Column(scale=0.1):
|
| 34 |
+
send_button = gr.Button("📤", elem_id="send_button")
|
| 35 |
|
| 36 |
+
# Add CSS to style the send button as a square
|
| 37 |
+
demo.css = """
|
| 38 |
+
#send_button {
|
| 39 |
+
width: 40px;
|
| 40 |
+
height: 40px;
|
| 41 |
+
padding: 0;
|
| 42 |
+
margin: 0;
|
| 43 |
+
display: flex;
|
| 44 |
+
justify-content: center;
|
| 45 |
+
align-items: center;
|
| 46 |
+
border-radius: 5px; /* Optional: For slightly rounded corners */
|
| 47 |
+
}
|
| 48 |
+
"""
|
| 49 |
+
|
| 50 |
# Connect the input to the chatbot function via the Send button
|
| 51 |
send_button.click(
|
| 52 |
chatbot,
|