BICORP commited on
Commit
de9a8d2
·
verified ·
1 Parent(s): fb405e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -16
app.py CHANGED
@@ -50,27 +50,24 @@ dark_css = """
50
  background-color: #3e3e3e; /* Dark input field */
51
  color: white; /* Light text color */
52
  border: none;
53
- border-radius: 15px;
54
- padding: 8px 12px;
 
55
  }
56
  #message-input:focus {
57
  outline: none;
58
  }
59
  #send-button {
60
- background-color: #007BFF; /* Button background */
61
- color: white; /* Button text color */
62
- border: none; /* No border */
63
- border-radius: 50%; /* Round button */
64
- width: 36px;
65
- height: 36px;
66
- display: flex;
67
- align-items: center;
68
- justify-content: center;
69
- cursor: pointer; /* Pointer cursor */
70
- margin-left: 10px;
71
  }
72
  #send-button:hover {
73
- background-color: #0056b3; /* Hover state */
74
  }
75
  """
76
 
@@ -89,7 +86,7 @@ def create_interface():
89
  # Input field with button inside
90
  with gr.Row(elem_id="input-container"):
91
  message = gr.Textbox(placeholder="Type a message...", elem_id="message-input", lines=1, show_label=False)
92
- send_btn = gr.Button("➤", elem_id="send-button") # Button inside the input box
93
 
94
  # Settings section
95
  with gr.Accordion("⚙️ Settings", open=False):
@@ -108,4 +105,4 @@ def create_interface():
108
  # Launch the interface
109
  if __name__ == "__main__":
110
  interface = create_interface()
111
- interface.launch()
 
50
  background-color: #3e3e3e; /* Dark input field */
51
  color: white; /* Light text color */
52
  border: none;
53
+ border-radius: 20px; /* Rounded corners for input */
54
+ padding: 10px 15px;
55
+ font-size: 14px;
56
  }
57
  #message-input:focus {
58
  outline: none;
59
  }
60
  #send-button {
61
+ background-color: transparent; /* Transparent background */
62
+ color: #007BFF; /* Button text color */
63
+ border: none; /* No border */
64
+ margin-left: -40px; /* Overlaps input box */
65
+ cursor: pointer; /* Pointer cursor */
66
+ font-size: 18px; /* Slightly larger icon */
67
+ padding: 0; /* Remove padding */
 
 
 
 
68
  }
69
  #send-button:hover {
70
+ color: #0056b3; /* Darker hover color */
71
  }
72
  """
73
 
 
86
  # Input field with button inside
87
  with gr.Row(elem_id="input-container"):
88
  message = gr.Textbox(placeholder="Type a message...", elem_id="message-input", lines=1, show_label=False)
89
+ send_btn = gr.Button("➤", elem_id="send-button") # Button overlaps input box
90
 
91
  # Settings section
92
  with gr.Accordion("⚙️ Settings", open=False):
 
105
  # Launch the interface
106
  if __name__ == "__main__":
107
  interface = create_interface()
108
+ interface.launch()