dipenvekaria commited on
Commit
e28cbff
·
verified ·
1 Parent(s): e9e0cdf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -196,7 +196,16 @@ custom_css = """
196
  .user-message { background-color: #E94560 !important; color: white; }
197
  .assistant-message { background-color: #0F3460 !important; color: white; }
198
  .message-input { background-color: #0F3460; color: white; border: 1px solid #E94560; border-radius: 8px; }
199
- .send-btn { background-color: #E94560; color: white; border: none; }
 
 
 
 
 
 
 
 
 
200
  .send-btn:hover { background-color: #FF6B6B; }
201
  .file-upload { background-color: #16213E; border: 1px dashed #E94560; border-radius: 8px; height: 200px; }
202
  .status-text { color: #E94560; font-size: 14px; text-align: center; }
@@ -222,8 +231,7 @@ with gr.Blocks(theme=modern_theme, css=custom_css) as demo:
222
  label=None,
223
  type="messages",
224
  height=500,
225
- elem_classes="chatbot",
226
- bubble_full_width=False
227
  )
228
  with gr.Row():
229
  msg = gr.Textbox(
@@ -238,14 +246,7 @@ with gr.Blocks(theme=modern_theme, css=custom_css) as demo:
238
  "Send",
239
  size="sm",
240
  elem_classes="send-btn",
241
- scale=2, # 20% of the row
242
- min_width=0, # Allows button to fit content
243
- _js="""() => {
244
- const textbox = document.querySelector('.message-input textarea');
245
- return {
246
- height: textbox ? textbox.offsetHeight : 'auto'
247
- };
248
- }""" # Matches height to textbox
249
  )
250
 
251
  # Right Column: Document Info and File Upload (30% width)
 
196
  .user-message { background-color: #E94560 !important; color: white; }
197
  .assistant-message { background-color: #0F3460 !important; color: white; }
198
  .message-input { background-color: #0F3460; color: white; border: 1px solid #E94560; border-radius: 8px; }
199
+ .message-input textarea { height: 60px !important; } /* Fixed height for 3 lines */
200
+ .send-btn {
201
+ background-color: #E94560;
202
+ color: white;
203
+ border: none;
204
+ height: 60px !important; /* Match textbox height */
205
+ display: flex;
206
+ align-items: center;
207
+ justify-content: center;
208
+ }
209
  .send-btn:hover { background-color: #FF6B6B; }
210
  .file-upload { background-color: #16213E; border: 1px dashed #E94560; border-radius: 8px; height: 200px; }
211
  .status-text { color: #E94560; font-size: 14px; text-align: center; }
 
231
  label=None,
232
  type="messages",
233
  height=500,
234
+ elem_classes="chatbot"
 
235
  )
236
  with gr.Row():
237
  msg = gr.Textbox(
 
246
  "Send",
247
  size="sm",
248
  elem_classes="send-btn",
249
+ scale=2 # 20% of the row
 
 
 
 
 
 
 
250
  )
251
 
252
  # Right Column: Document Info and File Upload (30% width)