DawnC commited on
Commit
32455f5
1 Parent(s): 6229ab4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -17
app.py CHANGED
@@ -373,7 +373,7 @@ async def predict(image):
373
  </h2>
374
  <div class="family-section">
375
  <div class="info-item">
376
- <span class="icon">👶</span>
377
  <span class="label">Good with Children:</span>
378
  <span class="value">{description['Good with Children']}</span>
379
  </div>
@@ -433,7 +433,7 @@ async def predict(image):
433
  <style>
434
  .dog-info-card {{
435
  border: 1px solid #e1e4e8;
436
- margin: 32px 0;
437
  padding: 0;
438
  border-radius: 12px;
439
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
@@ -447,7 +447,7 @@ async def predict(image):
447
  }}
448
 
449
  .dog-info-header {{
450
- padding: 20px 24px;
451
  margin: 0;
452
  font-size: 22px;
453
  font-weight: bold;
@@ -455,7 +455,7 @@ async def predict(image):
455
  }}
456
 
457
  .breed-info {{
458
- padding: 24px;
459
  line-height: 1.6;
460
  }}
461
 
@@ -463,14 +463,27 @@ async def predict(image):
463
  font-size: 1.2em;
464
  font-weight: 700;
465
  color: #2c3e50;
466
- margin: 28px 0 16px 0;
467
- padding-bottom: 8px;
468
  border-bottom: 2px solid #e1e4e8;
469
  text-transform: uppercase;
470
  letter-spacing: 0.5px;
471
  display: flex;
472
  align-items: center;
473
  gap: 8px;
 
 
 
 
 
 
 
 
 
 
 
 
 
474
  }}
475
 
476
  .icon {{
@@ -484,17 +497,24 @@ async def predict(image):
484
  display: flex;
485
  flex-wrap: wrap;
486
  gap: 16px;
487
- margin-bottom: 20px;
 
 
 
 
488
  }}
489
 
490
  .info-item {{
491
- background: #f8f9fa;
492
- padding: 12px 16px;
493
  border-radius: 8px;
494
  display: flex;
495
  align-items: center;
496
- gap: 8px;
497
- box-shadow: 0 1px 3px rgba(0,0,0,0.05);
 
 
 
498
  }}
499
 
500
  .label {{
@@ -508,19 +528,21 @@ async def predict(image):
508
 
509
  .temperament-section {{
510
  background: #f8f9fa;
511
- padding: 16px;
512
- border-radius: 8px;
513
- margin-bottom: 20px;
514
  color: #444;
 
515
  }}
516
 
517
  .description-section {{
518
  background: #f8f9fa;
519
- padding: 16px;
520
- border-radius: 8px;
521
- margin: 20px 0;
522
  line-height: 1.8;
523
  color: #444;
 
524
  }}
525
 
526
  .action-section {{
 
373
  </h2>
374
  <div class="family-section">
375
  <div class="info-item">
376
+ <span class="icon"></span>
377
  <span class="label">Good with Children:</span>
378
  <span class="value">{description['Good with Children']}</span>
379
  </div>
 
433
  <style>
434
  .dog-info-card {{
435
  border: 1px solid #e1e4e8;
436
+ margin: 40px 0; /* 增加卡片間距 */
437
  padding: 0;
438
  border-radius: 12px;
439
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
 
447
  }}
448
 
449
  .dog-info-header {{
450
+ padding: 24px 28px; /* 增加內距 */
451
  margin: 0;
452
  font-size: 22px;
453
  font-weight: bold;
 
455
  }}
456
 
457
  .breed-info {{
458
+ padding: 28px; /* 增加整體內距 */
459
  line-height: 1.6;
460
  }}
461
 
 
463
  font-size: 1.2em;
464
  font-weight: 700;
465
  color: #2c3e50;
466
+ margin: 32px 0 20px 0;
467
+ padding: 12px 0; /* 修正padding寫法並增加上下內距 */
468
  border-bottom: 2px solid #e1e4e8;
469
  text-transform: uppercase;
470
  letter-spacing: 0.5px;
471
  display: flex;
472
  align-items: center;
473
  gap: 8px;
474
+ position: relative;
475
+ }}
476
+
477
+ .section-title::before {{ /* 新增標題左側強調條 */
478
+ content: '';
479
+ position: absolute;
480
+ left: -28px;
481
+ top: 50%;
482
+ transform: translateY(-50%);
483
+ width: 4px;
484
+ height: 70%;
485
+ background: #2c3e50;
486
+ border-radius: 2px;
487
  }}
488
 
489
  .icon {{
 
497
  display: flex;
498
  flex-wrap: wrap;
499
  gap: 16px;
500
+ margin-bottom: 28px; /* 增加底部間距 */
501
+ padding: 20px; /* 增加內距 */
502
+ background: #f8f9fa;
503
+ border-radius: 12px;
504
+ border: 1px solid #e1e4e8; /* 添加邊框 */
505
  }}
506
 
507
  .info-item {{
508
+ background: white; /* 改為白色背景 */
509
+ padding: 14px 18px; /* 增加內距 */
510
  border-radius: 8px;
511
  display: flex;
512
  align-items: center;
513
+ gap: 10px;
514
+ box-shadow: 0 2px 4px rgba(0,0,0,0.05);
515
+ border: 1px solid #e1e4e8;
516
+ flex: 1 1 auto;
517
+ min-width: 200px;
518
  }}
519
 
520
  .label {{
 
528
 
529
  .temperament-section {{
530
  background: #f8f9fa;
531
+ padding: 20px; /* 增加內距 */
532
+ border-radius: 12px;
533
+ margin-bottom: 28px; /* 增加間距 */
534
  color: #444;
535
+ border: 1px solid #e1e4e8; /* 添加邊框 */
536
  }}
537
 
538
  .description-section {{
539
  background: #f8f9fa;
540
+ padding: 24px; /* 增加內距 */
541
+ border-radius: 12px;
542
+ margin: 28px 0; /* 增加上下間距 */
543
  line-height: 1.8;
544
  color: #444;
545
+ border: 1px solid #e1e4e8; /* 添加邊框 */
546
  }}
547
 
548
  .action-section {{