File size: 3,240 Bytes
d46b5d9
 
410702d
 
 
 
 
a865da8
 
410702d
a865da8
410702d
 
a865da8
 
410702d
a865da8
410702d
 
 
d8d5fca
410702d
 
 
 
 
d46b5d9
410702d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d46b5d9
410702d
 
 
 
d46b5d9
410702d
 
 
 
 
2a4fc2a
410702d
 
 
 
 
 
 
 
 
 
 
 
2a4fc2a
410702d
 
 
2a4fc2a
410702d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2a4fc2a
d46b5d9
 
a865da8
410702d
f112acd
d46b5d9
410702d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import gradio as gr

NEW_SPACE_URL = "https://huggingface.co/spaces/wsntxxn/Dasheng-AudioGen"

PAGE = f"""
<main class="move-card">
  <div class="icon" aria-hidden="true">🔊</div>
  <h1>Dasheng AudioGen demo has moved</h1>
  <p>The demo is now available in a new Hugging Face Space.</p>
  <a class="new-space-button" href="{NEW_SPACE_URL}" target="_blank" rel="noopener noreferrer">
    Open the new Space <span aria-hidden="true">→</span>
  </a>
  <div class="divider" role="separator"></div>
  <h2>Dasheng AudioGen Demo 已迁移</h2>
  <p>本Demo已迁移到新的 Hugging Face Space。</p>
  <a class="text-link" href="{NEW_SPACE_URL}" target="_blank" rel="noopener noreferrer">
    前往新的 Space <span aria-hidden="true">↗</span>
  </a>
</main>
"""

CSS = """
body {
  background:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, .16), transparent 32rem),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, .14), transparent 28rem);
}
.gradio-container {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh !important;
  padding: 2rem 1rem !important;
}
.move-card {
  width: min(42rem, 100%);
  margin: auto;
  padding: clamp(2rem, 6vw, 4rem);
  text-align: center;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
  backdrop-filter: blur(18px);
}
.icon {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.5rem;
  font-size: 2.25rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 12px 28px rgba(99, 102, 241, .3);
}
.move-card h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.2;
}
.move-card h2 {
  margin: 0 0 .75rem;
  color: #1e293b;
  font-size: 1.35rem;
}
.move-card p {
  margin: .75rem 0 1.75rem;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.7;
}
.new-space-button {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .9rem 1.4rem;
  color: white !important;
  font-weight: 700;
  text-decoration: none !important;
  border-radius: .85rem;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  box-shadow: 0 10px 24px rgba(99, 102, 241, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.new-space-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(99, 102, 241, .36);
}
.divider {
  width: 4rem;
  height: 1px;
  margin: 2.25rem auto;
  background: #cbd5e1;
}
.text-link {
  color: #4f46e5 !important;
  font-weight: 650;
  text-decoration: none !important;
}
.text-link:hover {
  text-decoration: underline !important;
}
@media (prefers-color-scheme: dark) {
  .move-card {
    border-color: rgba(148, 163, 184, .2);
    background: rgba(15, 23, 42, .82);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  }
  .move-card h1, .move-card h2 { color: #f8fafc; }
  .move-card p { color: #cbd5e1; }
  .divider { background: #475569; }
  .text-link { color: #a5b4fc !important; }
}
"""

with gr.Blocks(css=CSS, title="Dasheng AudioGen demo has moved") as demo:
    gr.HTML(PAGE)

if __name__ == "__main__":
    demo.launch()