Spaces:
Build error
Build error
Commit
·
664359d
1
Parent(s):
ff11d1b
update
Browse files
app.py
CHANGED
@@ -168,7 +168,146 @@ def inference_item(name, prompt):
|
|
168 |
return outputs_joint[0][0]
|
169 |
|
170 |
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
gr.HTML(
|
174 |
"""
|
|
|
168 |
return outputs_joint[0][0]
|
169 |
|
170 |
|
171 |
+
css = """
|
172 |
+
a {
|
173 |
+
color: inherit;
|
174 |
+
text-decoration: underline;
|
175 |
+
}
|
176 |
+
.gradio-container {
|
177 |
+
font-family: 'IBM Plex Sans', sans-serif;
|
178 |
+
}
|
179 |
+
.gr-button {
|
180 |
+
color: white;
|
181 |
+
border-color: #000000;
|
182 |
+
background: #000000;
|
183 |
+
}
|
184 |
+
input[type='range'] {
|
185 |
+
accent-color: #000000;
|
186 |
+
}
|
187 |
+
.dark input[type='range'] {
|
188 |
+
accent-color: #dfdfdf;
|
189 |
+
}
|
190 |
+
.container {
|
191 |
+
max-width: 730px;
|
192 |
+
margin: auto;
|
193 |
+
padding-top: 1.5rem;
|
194 |
+
}
|
195 |
+
#gallery {
|
196 |
+
min-height: 22rem;
|
197 |
+
margin-bottom: 15px;
|
198 |
+
margin-left: auto;
|
199 |
+
margin-right: auto;
|
200 |
+
border-bottom-right-radius: .5rem !important;
|
201 |
+
border-bottom-left-radius: .5rem !important;
|
202 |
+
}
|
203 |
+
#gallery>div>.h-full {
|
204 |
+
min-height: 20rem;
|
205 |
+
}
|
206 |
+
.details:hover {
|
207 |
+
text-decoration: underline;
|
208 |
+
}
|
209 |
+
.gr-button {
|
210 |
+
white-space: nowrap;
|
211 |
+
}
|
212 |
+
.gr-button:focus {
|
213 |
+
border-color: rgb(147 197 253 / var(--tw-border-opacity));
|
214 |
+
outline: none;
|
215 |
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
216 |
+
--tw-border-opacity: 1;
|
217 |
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
218 |
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px var(--tw-ring-offset-width)) var(--tw-ring-color);
|
219 |
+
--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
|
220 |
+
--tw-ring-opacity: .5;
|
221 |
+
}
|
222 |
+
#advanced-btn {
|
223 |
+
font-size: .7rem !important;
|
224 |
+
line-height: 19px;
|
225 |
+
margin-top: 12px;
|
226 |
+
margin-bottom: 12px;
|
227 |
+
padding: 2px 8px;
|
228 |
+
border-radius: 14px !important;
|
229 |
+
}
|
230 |
+
#advanced-options {
|
231 |
+
margin-bottom: 20px;
|
232 |
+
}
|
233 |
+
.footer {
|
234 |
+
margin-bottom: 45px;
|
235 |
+
margin-top: 35px;
|
236 |
+
text-align: center;
|
237 |
+
border-bottom: 1px solid #e5e5e5;
|
238 |
+
}
|
239 |
+
.footer>p {
|
240 |
+
font-size: .8rem;
|
241 |
+
display: inline-block;
|
242 |
+
padding: 0 10px;
|
243 |
+
transform: translateY(10px);
|
244 |
+
background: white;
|
245 |
+
}
|
246 |
+
.dark .footer {
|
247 |
+
border-color: #303030;
|
248 |
+
}
|
249 |
+
.dark .footer>p {
|
250 |
+
background: #0b0f19;
|
251 |
+
}
|
252 |
+
.acknowledgments h4{
|
253 |
+
margin: 1.25em 0 .25em 0;
|
254 |
+
font-weight: bold;
|
255 |
+
font-size: 115%;
|
256 |
+
}
|
257 |
+
#container-advanced-btns{
|
258 |
+
display: flex;
|
259 |
+
flex-wrap: wrap;
|
260 |
+
justify-content: space-between;
|
261 |
+
align-items: center;
|
262 |
+
}
|
263 |
+
.animate-spin {
|
264 |
+
animation: spin 1s linear infinite;
|
265 |
+
}
|
266 |
+
@keyframes spin {
|
267 |
+
from {
|
268 |
+
transform: rotate(0deg);
|
269 |
+
}
|
270 |
+
to {
|
271 |
+
transform: rotate(360deg);
|
272 |
+
}
|
273 |
+
}
|
274 |
+
#share-btn-container {
|
275 |
+
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;
|
276 |
+
margin-top: 10px;
|
277 |
+
margin-left: auto;
|
278 |
+
}
|
279 |
+
#share-btn {
|
280 |
+
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;
|
281 |
+
}
|
282 |
+
#share-btn * {
|
283 |
+
all: unset;
|
284 |
+
}
|
285 |
+
#share-btn-container div:nth-child(-n+2){
|
286 |
+
width: auto !important;
|
287 |
+
min-height: 0px !important;
|
288 |
+
}
|
289 |
+
#share-btn-container .wrap {
|
290 |
+
display: none !important;
|
291 |
+
}
|
292 |
+
.gr-form{
|
293 |
+
flex: 1 1 50%; border-top-right-radius: 0; border-bottom-right-radius: 0;
|
294 |
+
}
|
295 |
+
#prompt-container{
|
296 |
+
gap: 0;
|
297 |
+
}
|
298 |
+
#generated_id{
|
299 |
+
min-height: 700px
|
300 |
+
}
|
301 |
+
#setting_id{
|
302 |
+
margin-bottom: 12px;
|
303 |
+
text-align: center;
|
304 |
+
font-weight: 900;
|
305 |
+
}
|
306 |
+
"""
|
307 |
+
|
308 |
+
ui = gr.Blocks(css=css, title="Audio Flamingo - Demo")
|
309 |
+
|
310 |
+
with ui:
|
311 |
|
312 |
gr.HTML(
|
313 |
"""
|