Wanswan commited on
Commit
a842eee
·
verified ·
1 Parent(s): c5251b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -7
app.py CHANGED
@@ -239,22 +239,32 @@ footer { display: none !important; }
239
  label.svelte-1to105q {
240
  display: none !important;
241
  }
 
 
 
 
 
 
 
 
 
 
 
242
  #chatbox .message {
243
- font-size: 14px !important; /* ✅ 字体不要太大 */
244
- line-height: 1.4em !important; /* ✅ 行距控制好 */
245
- padding: 8px 12px !important; /* ✅ 气泡内边距 */
246
- border-radius: 12px !important;
247
- max-width: 85% !important; /* ✅ 控制气泡横向宽度 */
248
  word-break: break-word !important;
249
  white-space: normal !important;
250
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); /* 可选美化 */
251
  }
252
  @media screen and (max-width: 768px) {
253
  #chatbox .message {
254
  font-size: 13px !important;
255
- max-width: 92% !important;
256
  }
257
  }
 
258
  """) as demo:
259
  gr.HTML("""
260
  <script>
 
239
  label.svelte-1to105q {
240
  display: none !important;
241
  }
242
+ /* 关键:去掉 Gradio 默认的居中容器限制 */
243
+ .wrap, .gr-container, .gradio-container, .gr-box, .gr-block.gr-box {
244
+ max-width: 100vw !important;
245
+ width: 100vw !important;
246
+ margin: 0 !important;
247
+ padding: 0 !important;
248
+ box-shadow: none !important;
249
+ border: none !important;
250
+ }
251
+
252
+ /* 让消息气泡可以更宽(同时设置字体缩小) */
253
  #chatbox .message {
254
+ font-size: 14px !important;
255
+ line-height: 1.4em !important;
256
+ padding: 8px 12px !important;
257
+ max-width: 90% !important;
 
258
  word-break: break-word !important;
259
  white-space: normal !important;
 
260
  }
261
  @media screen and (max-width: 768px) {
262
  #chatbox .message {
263
  font-size: 13px !important;
264
+ max-width: 94% !important;
265
  }
266
  }
267
+
268
  """) as demo:
269
  gr.HTML("""
270
  <script>