Spaces:
Running
Running
tianfengping.tfp
commited on
Commit
·
0c4a3eb
1
Parent(s):
9d5a4ea
beatify profile
Browse files
app.py
CHANGED
|
@@ -397,53 +397,95 @@ body {
|
|
| 397 |
padding: 0 1rem;
|
| 398 |
}
|
| 399 |
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
}
|
| 405 |
|
| 406 |
-
|
| 407 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
display: flex;
|
| 409 |
-
|
|
|
|
|
|
|
|
|
|
| 410 |
}
|
| 411 |
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
|
|
|
|
|
|
| 415 |
border: none !important;
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
min-width:
|
| 419 |
-
flex-shrink: 0; /* 防止在空间不足时被压缩 */
|
| 420 |
}
|
| 421 |
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
object-fit: cover; /* 裁剪并填充,保持宽高比,确保填满容器 */
|
| 427 |
-
display: block; /* 移除图片底部的微小空隙 */
|
| 428 |
}
|
| 429 |
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
display: flex;
|
| 435 |
-
flex-direction: column;
|
| 436 |
-
justify-content: center; /* 垂直居中标题 */
|
| 437 |
-
flex-grow: 1; /* 占据所有剩余空间 */
|
| 438 |
}
|
| 439 |
|
| 440 |
-
|
| 441 |
-
#
|
| 442 |
-
color:
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
|
|
|
|
|
|
| 447 |
}
|
| 448 |
|
| 449 |
.tabs {
|
|
@@ -651,12 +693,26 @@ input[type="text"]:focus, textarea:focus {
|
|
| 651 |
}
|
| 652 |
|
| 653 |
@media (max-width: 768px) {
|
| 654 |
-
|
| 655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 656 |
}
|
| 657 |
|
| 658 |
-
|
| 659 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 660 |
}
|
| 661 |
|
| 662 |
.gradio-container {
|
|
@@ -672,22 +728,33 @@ input[type="text"]:focus, textarea:focus {
|
|
| 672 |
|
| 673 |
|
| 674 |
with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
| 675 |
-
with
|
| 676 |
-
|
| 677 |
-
|
| 678 |
-
|
| 679 |
-
|
| 680 |
-
|
| 681 |
-
|
| 682 |
-
|
| 683 |
-
|
| 684 |
-
|
| 685 |
-
|
| 686 |
-
|
| 687 |
-
|
| 688 |
-
|
| 689 |
-
|
| 690 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 691 |
|
| 692 |
with gr.Tabs(elem_classes="tabs") as tabs:
|
| 693 |
with gr.TabItem("😄 Control of emotion", id=0):
|
|
|
|
| 397 |
padding: 0 1rem;
|
| 398 |
}
|
| 399 |
|
| 400 |
+
/* Main header with blue background */
|
| 401 |
+
#main-header {
|
| 402 |
+
background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%) !important;
|
| 403 |
+
padding: 60px 40px !important;
|
| 404 |
+
border-radius: 0 !important;
|
| 405 |
+
margin-bottom: 2rem !important;
|
| 406 |
+
text-align: center;
|
| 407 |
+
}
|
| 408 |
+
|
| 409 |
+
#header-content {
|
| 410 |
+
max-width: 1200px;
|
| 411 |
+
margin: 0 auto;
|
| 412 |
+
}
|
| 413 |
+
|
| 414 |
+
/* Main title */
|
| 415 |
+
#main-title {
|
| 416 |
+
color: white !important;
|
| 417 |
+
font-size: 48px !important;
|
| 418 |
+
font-weight: 700 !important;
|
| 419 |
+
margin: 0 0 10px 0 !important;
|
| 420 |
+
text-align: center;
|
| 421 |
+
letter-spacing: -1px;
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
#main-title h1 {
|
| 425 |
+
color: white !important;
|
| 426 |
+
font-size: 48px !important;
|
| 427 |
+
font-weight: 700 !important;
|
| 428 |
+
margin: 0 !important;
|
| 429 |
+
text-align: center;
|
| 430 |
+
letter-spacing: -1px;
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
/* Subtitle */
|
| 434 |
+
#subtitle {
|
| 435 |
+
color: rgba(255, 255, 255, 0.9) !important;
|
| 436 |
+
font-size: 18px !important;
|
| 437 |
+
font-weight: 400 !important;
|
| 438 |
+
margin: 0 0 40px 0 !important;
|
| 439 |
+
text-align: center;
|
| 440 |
}
|
| 441 |
|
| 442 |
+
#subtitle p {
|
| 443 |
+
color: rgba(255, 255, 255, 0.9) !important;
|
| 444 |
+
font-size: 18px !important;
|
| 445 |
+
margin: 0 !important;
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
/* Button row */
|
| 449 |
+
#button-row {
|
| 450 |
display: flex;
|
| 451 |
+
justify-content: center;
|
| 452 |
+
gap: 12px;
|
| 453 |
+
flex-wrap: wrap;
|
| 454 |
+
margin-top: 30px;
|
| 455 |
}
|
| 456 |
|
| 457 |
+
.header-btn {
|
| 458 |
+
padding: 12px 24px !important;
|
| 459 |
+
border-radius: 6px !important;
|
| 460 |
+
font-weight: 600 !important;
|
| 461 |
+
font-size: 14px !important;
|
| 462 |
border: none !important;
|
| 463 |
+
cursor: pointer;
|
| 464 |
+
transition: all 0.3s ease !important;
|
| 465 |
+
min-width: 120px;
|
|
|
|
| 466 |
}
|
| 467 |
|
| 468 |
+
.header-btn-secondary {
|
| 469 |
+
background: rgba(255, 255, 255, 0.15) !important;
|
| 470 |
+
color: white !important;
|
| 471 |
+
backdrop-filter: blur(10px);
|
|
|
|
|
|
|
| 472 |
}
|
| 473 |
|
| 474 |
+
.header-btn-secondary:hover {
|
| 475 |
+
background: rgba(255, 255, 255, 0.25) !important;
|
| 476 |
+
transform: translateY(-2px);
|
| 477 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 478 |
}
|
| 479 |
|
| 480 |
+
.header-btn-primary {
|
| 481 |
+
background: #fbbf24 !important;
|
| 482 |
+
color: #1e3a8a !important;
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
.header-btn-primary:hover {
|
| 486 |
+
background: #f59e0b !important;
|
| 487 |
+
transform: translateY(-2px);
|
| 488 |
+
box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4) !important;
|
| 489 |
}
|
| 490 |
|
| 491 |
.tabs {
|
|
|
|
| 693 |
}
|
| 694 |
|
| 695 |
@media (max-width: 768px) {
|
| 696 |
+
#main-header {
|
| 697 |
+
padding: 40px 20px !important;
|
| 698 |
+
}
|
| 699 |
+
|
| 700 |
+
#main-title h1 {
|
| 701 |
+
font-size: 32px !important;
|
| 702 |
+
}
|
| 703 |
+
|
| 704 |
+
#subtitle p {
|
| 705 |
+
font-size: 16px !important;
|
| 706 |
}
|
| 707 |
|
| 708 |
+
#button-row {
|
| 709 |
+
gap: 8px;
|
| 710 |
+
}
|
| 711 |
+
|
| 712 |
+
.header-btn {
|
| 713 |
+
padding: 10px 16px !important;
|
| 714 |
+
font-size: 12px !important;
|
| 715 |
+
min-width: 100px;
|
| 716 |
}
|
| 717 |
|
| 718 |
.gradio-container {
|
|
|
|
| 728 |
|
| 729 |
|
| 730 |
with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
| 731 |
+
# Header section with blue background
|
| 732 |
+
gr.HTML(
|
| 733 |
+
"""
|
| 734 |
+
<div align="center" style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Microsoft YaHei', sans-serif; padding: 60px 20px; background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%); margin-bottom: 2rem;">
|
| 735 |
+
<h1 style="font-weight: 700; color: #FFFFFF; margin-bottom: 0.25rem; font-size: 2.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.2);">
|
| 736 |
+
Marco-Voice-TTS
|
| 737 |
+
</h1>
|
| 738 |
+
<p style="margin-top: 0; margin-bottom: 1.5rem;">
|
| 739 |
+
<a href="https://www.aidc-ai.com" style="font-size: 1.25rem; color: #FBBF24; text-decoration: none; font-weight: 500; text-shadow: 0 1px 2px rgba(0,0,0,0.2);">
|
| 740 |
+
Alibaba International Digital Commerce
|
| 741 |
+
</a>
|
| 742 |
+
</p>
|
| 743 |
+
|
| 744 |
+
<div style="display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;">
|
| 745 |
+
<a href="https://github.com/AIDC-AI/Marco-Voice" target="_blank">
|
| 746 |
+
<img src="https://img.shields.io/badge/GitHub-Repository-181717?logo=github&style=for-the-badge" alt="GitHub">
|
| 747 |
+
</a>
|
| 748 |
+
<a href="https://huggingface.co/AIDC-AI/Marco-Voice" target="_blank">
|
| 749 |
+
<img src="https://img.shields.io/badge/Hugging%20Face-Model-FFC107?logo=huggingface&style=for-the-badge" alt="Hugging Face Model">
|
| 750 |
+
</a>
|
| 751 |
+
<a href="https://huggingface.co/spaces/AIDC-AI/Marco-Voice-TTS" target="_blank">
|
| 752 |
+
<img src="https://img.shields.io/badge/Demo-HF%20Space-E67E22?logo=huggingface&style=for-the-badge" alt="Demo HF Space">
|
| 753 |
+
</a>
|
| 754 |
+
</div>
|
| 755 |
+
</div>
|
| 756 |
+
"""
|
| 757 |
+
)
|
| 758 |
|
| 759 |
with gr.Tabs(elem_classes="tabs") as tabs:
|
| 760 |
with gr.TabItem("😄 Control of emotion", id=0):
|