BICORP commited on
Commit
fa2e07e
·
verified ·
1 Parent(s): 4b672ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -17
app.py CHANGED
@@ -21,32 +21,28 @@ def create_chat_interface():
21
  gr.Markdown("# Chatbot Interface")
22
 
23
  # Define the chat interface
24
- with gr.Row():
25
- # Chatbot component
26
- chatbot_component = gr.Chatbot(type="messages", label="Chat History", height=500)
27
 
28
- with gr.Row():
29
- # Container for input and send button
30
- with gr.Box(elem_id="input_container"):
31
- user_input = gr.Textbox(
32
- placeholder="Type your message here...", label=None, lines=1, elem_id="user_input"
33
- )
34
- send_button = gr.Button("📤", elem_id="send_button")
35
 
36
  # Add CSS for styling the input container and placing the button inside
37
  demo.css = """
38
  #input_container {
39
  display: flex;
40
  align-items: center;
41
- border: 1px solid #ccc;
42
- border-radius: 8px;
43
- padding: 5px;
44
  }
45
  #user_input {
46
  flex-grow: 1;
47
- border: none;
48
- outline: none;
49
- padding: 8px;
50
  }
51
  #send_button {
52
  width: 40px;
@@ -55,10 +51,10 @@ def create_chat_interface():
55
  color: white;
56
  border: none;
57
  border-radius: 50%;
 
58
  display: flex;
59
  justify-content: center;
60
  align-items: center;
61
- cursor: pointer;
62
  }
63
  #send_button:hover {
64
  background-color: #0056b3;
 
21
  gr.Markdown("# Chatbot Interface")
22
 
23
  # Define the chat interface
24
+ chatbot_component = gr.Chatbot(type="messages", label="Chat History", height=500)
 
 
25
 
26
+ with gr.Row(elem_id="input_container"):
27
+ # Input field
28
+ user_input = gr.Textbox(
29
+ placeholder="Type your message here...", label=None, lines=1, elem_id="user_input"
30
+ )
31
+ # Send button
32
+ send_button = gr.Button("📤", elem_id="send_button")
33
 
34
  # Add CSS for styling the input container and placing the button inside
35
  demo.css = """
36
  #input_container {
37
  display: flex;
38
  align-items: center;
39
+ gap: 5px;
 
 
40
  }
41
  #user_input {
42
  flex-grow: 1;
43
+ border: 1px solid #ccc;
44
+ border-radius: 8px;
45
+ padding: 10px;
46
  }
47
  #send_button {
48
  width: 40px;
 
51
  color: white;
52
  border: none;
53
  border-radius: 50%;
54
+ cursor: pointer;
55
  display: flex;
56
  justify-content: center;
57
  align-items: center;
 
58
  }
59
  #send_button:hover {
60
  background-color: #0056b3;