Spaces:
Running
on
A10G
Running
on
A10G
Commit
β’
d5a2c8a
1
Parent(s):
984cfda
up
Browse files
README.md
CHANGED
@@ -4,12 +4,10 @@ emoji: π
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
-
license:
|
11 |
-
duplicated_from: haoheliu/audioldm2-text2audio-text2music
|
12 |
-
|
13 |
---
|
14 |
|
15 |
[![arXiv](https://img.shields.io/badge/arXiv-2308.05734-brightgreen.svg?style=flat-square)](https://arxiv.org/abs/2308.05734) [![githubio](https://img.shields.io/badge/GitHub.io-Audio_Samples-blue?logo=Github&style=flat-square)](https://audioldm.github.io/audioldm2/) [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/haoheliu/audioldm2-text2audio-text2music)
|
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.40.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
+
license: cc-by-nc-nd-4.0
|
|
|
|
|
11 |
---
|
12 |
|
13 |
[![arXiv](https://img.shields.io/badge/arXiv-2308.05734-brightgreen.svg?style=flat-square)](https://arxiv.org/abs/2308.05734) [![githubio](https://img.shields.io/badge/GitHub.io-Audio_Samples-blue?logo=Github&style=flat-square)](https://audioldm.github.io/audioldm2/) [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/haoheliu/audioldm2-text2audio-text2music)
|
app.py
CHANGED
@@ -40,80 +40,138 @@ def text2audio(text, negative_prompt, duration, guidance_scale, random_seed, n_c
|
|
40 |
|
41 |
css = """
|
42 |
a {
|
43 |
-
color: inherit;
|
44 |
-
|
|
|
|
|
45 |
font-family: 'IBM Plex Sans', sans-serif;
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
49 |
accent-color: #000000;
|
50 |
-
}
|
|
|
51 |
accent-color: #dfdfdf;
|
52 |
-
}
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
min-height: 20rem;
|
59 |
-
}
|
|
|
60 |
text-decoration: underline;
|
61 |
-
}
|
|
|
62 |
white-space: nowrap;
|
63 |
-
}
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
var(--tw-ring-offset-
|
68 |
-
|
69 |
-
var(--tw-ring-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
border-radius: 14px !important;
|
73 |
-
}
|
|
|
74 |
margin-bottom: 20px;
|
75 |
-
}
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
border-color: #303030;
|
81 |
-
}
|
|
|
82 |
background: #0b0f19;
|
83 |
-
}
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
animation: spin 1s linear infinite;
|
89 |
-
}
|
|
|
90 |
from {
|
91 |
transform: rotate(0deg);
|
92 |
-
}
|
|
|
93 |
transform: rotate(360deg);
|
94 |
}
|
95 |
-
}
|
96 |
-
|
97 |
-
#000000; justify-content: center; align-items: center; border-radius: 9999px !important; width: 13rem;
|
98 |
-
margin-top: 10px;
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
!important;right:0;
|
103 |
-
}
|
|
|
104 |
all: unset;
|
105 |
-
}
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
108 |
display: none !important;
|
109 |
-
}
|
|
|
110 |
flex: 1 1 50%; border-top-right-radius: 0; border-bottom-right-radius: 0;
|
111 |
-
}
|
|
|
112 |
gap: 0;
|
113 |
-
}
|
|
|
114 |
min-height: 700px
|
115 |
-
}
|
116 |
-
|
|
|
|
|
|
|
117 |
}
|
118 |
"""
|
119 |
iface = gr.Blocks(css=css)
|
@@ -259,4 +317,3 @@ with iface:
|
|
259 |
)
|
260 |
|
261 |
iface.queue(max_size=20).launch()
|
262 |
-
|
|
|
40 |
|
41 |
css = """
|
42 |
a {
|
43 |
+
color: inherit;
|
44 |
+
text-decoration: underline;
|
45 |
+
}
|
46 |
+
.gradio-container {
|
47 |
font-family: 'IBM Plex Sans', sans-serif;
|
48 |
+
max-width: 730px !important;
|
49 |
+
}
|
50 |
+
.gr-button {
|
51 |
+
color: white;
|
52 |
+
border-color: #000000;
|
53 |
+
background: #000000;
|
54 |
+
}
|
55 |
+
input[type='range'] {
|
56 |
accent-color: #000000;
|
57 |
+
}
|
58 |
+
.dark input[type='range'] {
|
59 |
accent-color: #dfdfdf;
|
60 |
+
}
|
61 |
+
.container {
|
62 |
+
margin: auto;
|
63 |
+
padding-top: 1.5rem;
|
64 |
+
}
|
65 |
+
#gallery {
|
66 |
+
min-height: 22rem;
|
67 |
+
margin-bottom: 15px;
|
68 |
+
margin-left: auto;
|
69 |
+
margin-right: auto;
|
70 |
+
border-bottom-right-radius: .5rem !important;
|
71 |
+
border-bottom-left-radius: .5rem !important;
|
72 |
+
}
|
73 |
+
#gallery>div>.h-full {
|
74 |
min-height: 20rem;
|
75 |
+
}
|
76 |
+
.details:hover {
|
77 |
text-decoration: underline;
|
78 |
+
}
|
79 |
+
.gr-button {
|
80 |
white-space: nowrap;
|
81 |
+
}
|
82 |
+
.gr-button:focus {
|
83 |
+
border-color: rgb(147 197 253 / var(--tw-border-opacity));
|
84 |
+
outline: none;
|
85 |
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
86 |
+
--tw-border-opacity: 1;
|
87 |
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
88 |
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px var(--tw-ring-offset-width)) var(--tw-ring-color);
|
89 |
+
--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
|
90 |
+
--tw-ring-opacity: .5;
|
91 |
+
}
|
92 |
+
#advanced-btn {
|
93 |
+
font-size: .7rem !important;
|
94 |
+
line-height: 19px;
|
95 |
+
margin-top: 12px;
|
96 |
+
margin-bottom: 12px;
|
97 |
+
padding: 2px 8px;
|
98 |
border-radius: 14px !important;
|
99 |
+
}
|
100 |
+
#advanced-options {
|
101 |
margin-bottom: 20px;
|
102 |
+
}
|
103 |
+
.footer {
|
104 |
+
margin-bottom: 45px;
|
105 |
+
margin-top: 35px;
|
106 |
+
text-align: center;
|
107 |
+
border-bottom: 1px solid #e5e5e5;
|
108 |
+
}
|
109 |
+
.footer>p {
|
110 |
+
font-size: .8rem;
|
111 |
+
display: inline-block;
|
112 |
+
padding: 0 10px;
|
113 |
+
transform: translateY(10px);
|
114 |
+
background: white;
|
115 |
+
}
|
116 |
+
.dark .footer {
|
117 |
border-color: #303030;
|
118 |
+
}
|
119 |
+
.dark .footer>p {
|
120 |
background: #0b0f19;
|
121 |
+
}
|
122 |
+
.acknowledgments h4{
|
123 |
+
margin: 1.25em 0 .25em 0;
|
124 |
+
font-weight: bold;
|
125 |
+
font-size: 115%;
|
126 |
+
}
|
127 |
+
#container-advanced-btns{
|
128 |
+
display: flex;
|
129 |
+
flex-wrap: wrap;
|
130 |
+
justify-content: space-between;
|
131 |
+
align-items: center;
|
132 |
+
}
|
133 |
+
.animate-spin {
|
134 |
animation: spin 1s linear infinite;
|
135 |
+
}
|
136 |
+
@keyframes spin {
|
137 |
from {
|
138 |
transform: rotate(0deg);
|
139 |
+
}
|
140 |
+
to {
|
141 |
transform: rotate(360deg);
|
142 |
}
|
143 |
+
}
|
144 |
+
#share-btn-container {
|
145 |
+
display: flex; padding-left: 0.5rem !important; padding-right: 0.5rem !important; background-color: #000000; justify-content: center; align-items: center; border-radius: 9999px !important; width: 13rem;
|
146 |
+
margin-top: 10px;
|
147 |
+
margin-left: auto;
|
148 |
+
}
|
149 |
+
#share-btn {
|
150 |
+
all: initial; color: #ffffff;font-weight: 600; cursor:pointer; font-family: 'IBM Plex Sans', sans-serif; margin-left: 0.5rem !important; padding-top: 0.25rem !important; padding-bottom: 0.25rem !important;right:0;
|
151 |
+
}
|
152 |
+
#share-btn * {
|
153 |
all: unset;
|
154 |
+
}
|
155 |
+
#share-btn-container div:nth-child(-n+2){
|
156 |
+
width: auto !important;
|
157 |
+
min-height: 0px !important;
|
158 |
+
}
|
159 |
+
#share-btn-container .wrap {
|
160 |
display: none !important;
|
161 |
+
}
|
162 |
+
.gr-form{
|
163 |
flex: 1 1 50%; border-top-right-radius: 0; border-bottom-right-radius: 0;
|
164 |
+
}
|
165 |
+
#prompt-container{
|
166 |
gap: 0;
|
167 |
+
}
|
168 |
+
#generated_id{
|
169 |
min-height: 700px
|
170 |
+
}
|
171 |
+
#setting_id{
|
172 |
+
margin-bottom: 12px;
|
173 |
+
text-align: center;
|
174 |
+
font-weight: 900;
|
175 |
}
|
176 |
"""
|
177 |
iface = gr.Blocks(css=css)
|
|
|
317 |
)
|
318 |
|
319 |
iface.queue(max_size=20).launch()
|
|