Wanswan commited on
Commit
2e8fea7
·
verified ·
1 Parent(s): def97c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -27
app.py CHANGED
@@ -200,26 +200,25 @@ def init():
200
  return [{"role": "assistant", "content": WELCOME_MESSAGE_EN}], 0, "", [], False
201
 
202
 
 
203
  with gr.Blocks(css="""
204
  .send-btn {
205
  background-color: #25D366 !important;
206
  color: white !important;
207
  border: none;
208
- border-radius: 10px;
209
  font-size: 20px;
210
- height: 42px;
211
- width: 100%;
212
- padding: 0;
213
- margin: 0;
214
  cursor: pointer;
215
  }
216
-
217
-
218
  #chatbox .avatar-container {
219
- width: 48px !important;
220
- height: 48px !important;
221
- min-width: 48px !important;
222
- min-height: 48px !important;
223
  background-size: 100% 100% !important;
224
  background-position: center center !important;
225
  border-radius: 50% !important;
@@ -231,14 +230,6 @@ with gr.Blocks(css="""
231
  }
232
  #chatbox .message.user { background-color: #DCF8C6 !important; }
233
  #chatbox .message.assistant { background-color: #ffffff !important; }
234
- #chatbox .message {
235
- line-height: 1.6em !important;
236
- padding: 10px 14px !important;
237
- border-radius: 12px !important;
238
- font-size: 16px !important;
239
- max-width: 85% !important;
240
- }
241
-
242
  footer { display: none !important; }
243
  .svelte-1ipelgc { display: none !important; }
244
  .icon-button-wrapper {
@@ -270,22 +261,19 @@ label.svelte-1to105q {
270
  label="",
271
  avatar_images=["user_avatar.jpg", "humanlike_avatar.png"],
272
  bubble_full_width=False,
273
- height=80,
274
  show_copy_button=False,
275
  type="messages"
276
  )
277
 
278
- with gr.Row(equal_height=True):
279
- with gr.Column(scale=11):
280
  user_input = gr.Textbox(
281
  show_label=False,
282
  placeholder="Type your message here and press send...",
283
- container=True
 
284
  )
285
- with gr.Column(scale=1, min_width=48):
286
- send_btn = gr.Button(value="➤", elem_classes="send-btn", scale=1)
287
-
288
-
289
 
290
  state = gr.State([])
291
  step = gr.State(0)
 
200
  return [{"role": "assistant", "content": WELCOME_MESSAGE_EN}], 0, "", [], False
201
 
202
 
203
+
204
  with gr.Blocks(css="""
205
  .send-btn {
206
  background-color: #25D366 !important;
207
  color: white !important;
208
  border: none;
209
+ border-radius: 24px;
210
  font-size: 20px;
211
+ padding: 8px 20px;
212
+ height: 48px;
213
+ width: 60px;
214
+ margin-left: 8px;
215
  cursor: pointer;
216
  }
 
 
217
  #chatbox .avatar-container {
218
+ width: 64px !important;
219
+ height: 64px !important;
220
+ min-width: 64px !important;
221
+ min-height: 64px !important;
222
  background-size: 100% 100% !important;
223
  background-position: center center !important;
224
  border-radius: 50% !important;
 
230
  }
231
  #chatbox .message.user { background-color: #DCF8C6 !important; }
232
  #chatbox .message.assistant { background-color: #ffffff !important; }
 
 
 
 
 
 
 
 
233
  footer { display: none !important; }
234
  .svelte-1ipelgc { display: none !important; }
235
  .icon-button-wrapper {
 
261
  label="",
262
  avatar_images=["user_avatar.jpg", "humanlike_avatar.png"],
263
  bubble_full_width=False,
264
+ height=500,
265
  show_copy_button=False,
266
  type="messages"
267
  )
268
 
269
+ with gr.Row():
 
270
  user_input = gr.Textbox(
271
  show_label=False,
272
  placeholder="Type your message here and press send...",
273
+ container=True,
274
+ scale=10
275
  )
276
+ send_btn = gr.Button(value="➤", elem_classes="send-btn")
 
 
 
277
 
278
  state = gr.State([])
279
  step = gr.State(0)