Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -161,161 +161,77 @@ ROFORMER_MODELS = {
|
|
| 161 |
OUTPUT_FORMATS = ['wav', 'flac', 'mp3', 'ogg', 'opus', 'm4a', 'aiff', 'ac3']
|
| 162 |
|
| 163 |
# CSS (unchanged from provided version)
|
| 164 |
-
|
| 165 |
-
/* Modern ve Etkileşimli Tema */
|
| 166 |
-
#app-container {
|
| 167 |
-
max-width: 900px;
|
| 168 |
-
width: 100%;
|
| 169 |
-
margin: 0 auto;
|
| 170 |
-
padding: 1rem;
|
| 171 |
-
box-sizing: border-box;
|
| 172 |
-
display: flex;
|
| 173 |
-
flex-direction: column;
|
| 174 |
-
align-items: center;
|
| 175 |
-
min-height: 100vh;
|
| 176 |
-
background: linear-gradient(135deg, #1a0b2e, #2e1a47);
|
| 177 |
-
position: relative;
|
| 178 |
-
overflow: visible; /* Ensure no clipping */
|
| 179 |
-
}
|
| 180 |
body {
|
| 181 |
-
background:
|
|
|
|
|
|
|
| 182 |
margin: 0;
|
| 183 |
-
padding:
|
| 184 |
-
font-family: '
|
| 185 |
-
color: #
|
| 186 |
-
|
| 187 |
-
justify-content: center;
|
| 188 |
-
}
|
| 189 |
-
body::after {
|
| 190 |
-
content: '';
|
| 191 |
-
position: fixed;
|
| 192 |
-
top: 0;
|
| 193 |
-
left: 0;
|
| 194 |
-
width: 100%;
|
| 195 |
-
height: 100%;
|
| 196 |
-
background: rgba(26, 11, 46, 0.8);
|
| 197 |
-
z-index: -1;
|
| 198 |
-
}
|
| 199 |
-
.logo-container {
|
| 200 |
-
position: fixed;
|
| 201 |
-
top: 1rem;
|
| 202 |
-
left: 50%;
|
| 203 |
-
transform: translateX(-50%);
|
| 204 |
-
z-index: 2000;
|
| 205 |
-
}
|
| 206 |
-
.logo-img {
|
| 207 |
-
width: 80px;
|
| 208 |
-
height: auto;
|
| 209 |
-
transition: transform 0.3s ease;
|
| 210 |
-
}
|
| 211 |
-
.logo-img:hover {
|
| 212 |
-
transform: scale(1.1);
|
| 213 |
}
|
| 214 |
.header-text {
|
| 215 |
text-align: center;
|
| 216 |
-
padding:
|
| 217 |
-
color: #
|
| 218 |
-
font-size:
|
| 219 |
-
font-weight:
|
| 220 |
-
text-shadow: 0 0 10px rgba(255,
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
@keyframes glow {
|
| 224 |
-
0% { text-shadow: 0 0 10px rgba(255, 107, 107, 0.7); }
|
| 225 |
-
100% { text-shadow: 0 0 20px rgba(255, 107, 107, 1); }
|
| 226 |
}
|
| 227 |
-
.
|
| 228 |
-
padding: 1rem; /* Keep padding for spacing */
|
| 229 |
-
width: 100%;
|
| 230 |
-
transition: transform 0.3s ease; /* Keep transition for hover effect */
|
| 231 |
-
position: relative;
|
| 232 |
-
z-index: 10;
|
| 233 |
-
background: transparent; /* Remove background to blend with parent */
|
| 234 |
-
}
|
| 235 |
-
.dubbing-theme:hover {
|
| 236 |
-
transform: translateY(-5px);
|
| 237 |
-
}
|
| 238 |
-
.footer {
|
| 239 |
text-align: center;
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
font-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
background: rgba(
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
}
|
| 252 |
button {
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
|
|
|
| 256 |
border-radius: 8px !important;
|
| 257 |
padding: 8px 16px !important;
|
| 258 |
-
|
| 259 |
-
font-weight: 600 !important;
|
| 260 |
-
transition: all 0.3s ease !important;
|
| 261 |
-
box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4) !important;
|
| 262 |
}
|
| 263 |
button:hover {
|
| 264 |
transform: scale(1.05) !important;
|
| 265 |
-
|
| 266 |
-
|
| 267 |
}
|
| 268 |
.compact-upload.horizontal {
|
| 269 |
-
display: flex !important;
|
| 270 |
align-items: center !important;
|
| 271 |
gap: 8px !important;
|
| 272 |
-
max-width:
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
|
|
|
| 276 |
border-radius: 8px !important;
|
| 277 |
-
color: #e0e0e0 !important;
|
| 278 |
-
transition: border-color 0.3s ease !important;
|
| 279 |
-
}
|
| 280 |
-
.compact-upload.horizontal:hover {
|
| 281 |
-
border-color: #ff8787 !important;
|
| 282 |
-
}
|
| 283 |
-
.compact-upload.horizontal button {
|
| 284 |
-
padding: 4px 10px !important;
|
| 285 |
-
font-size: 0.8rem !important;
|
| 286 |
-
}
|
| 287 |
-
.gr-tab {
|
| 288 |
-
background: rgba(46, 26, 71, 0.7) !important;
|
| 289 |
-
border-radius: 8px 8px 0 0 !important;
|
| 290 |
-
padding: 0.5rem 1rem !important;
|
| 291 |
-
margin: 0 2px !important;
|
| 292 |
-
color: #e0e0e0 !important;
|
| 293 |
-
border: 2px solid #ff6b6b !important;
|
| 294 |
-
font-size: 1rem !important;
|
| 295 |
-
transition: all 0.3s ease !important;
|
| 296 |
-
}
|
| 297 |
-
.gr-tab-selected {
|
| 298 |
-
background: #ff6b6b !important;
|
| 299 |
-
color: #fff !important;
|
| 300 |
-
border: 2px solid #ff8787 !important;
|
| 301 |
-
box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5) !important;
|
| 302 |
-
}
|
| 303 |
-
.compact-grid {
|
| 304 |
-
gap: 0.5rem !important;
|
| 305 |
-
max-height: 40vh;
|
| 306 |
-
overflow-y: auto;
|
| 307 |
-
padding: 1rem;
|
| 308 |
-
background: rgba(46, 26, 71, 0.7) !important;
|
| 309 |
-
border-radius: 10px;
|
| 310 |
-
border: 2px solid #ff6b6b !important;
|
| 311 |
-
width: 100%;
|
| 312 |
}
|
| 313 |
.compact-dropdown {
|
| 314 |
padding: 8px 12px !important;
|
| 315 |
border-radius: 8px !important;
|
| 316 |
-
border: 2px solid #ff6b6b !important;
|
| 317 |
-
background: rgba(46, 26, 71, 0.7) !important;
|
| 318 |
-
color: #e0e0e0 !important;
|
| 319 |
width: 100%;
|
| 320 |
font-size: 1rem !important;
|
| 321 |
transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
|
|
@@ -323,7 +239,7 @@ button:hover {
|
|
| 323 |
z-index: 100; /* Base z-index for dropdown */
|
| 324 |
}
|
| 325 |
.compact-dropdown:hover {
|
| 326 |
-
border-color: #ff8787 !important;
|
| 327 |
box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4) !important;
|
| 328 |
}
|
| 329 |
.compact-dropdown select, .compact-dropdown .gr-dropdown {
|
|
@@ -338,20 +254,19 @@ button:hover {
|
|
| 338 |
-moz-appearance: none !important;
|
| 339 |
}
|
| 340 |
.compact-dropdown .gr-dropdown-menu {
|
| 341 |
-
background: rgba(46, 26, 71, 0.95) !important;
|
| 342 |
-
border: 2px solid #ff6b6b !important;
|
| 343 |
border-radius: 8px !important;
|
| 344 |
color: #e0e0e0 !important;
|
| 345 |
max-height: 300px !important;
|
| 346 |
overflow-y: auto !important;
|
| 347 |
-
z-index: 300 !important; /*
|
| 348 |
width: 100% !important;
|
| 349 |
opacity: 1 !important;
|
| 350 |
visibility: visible !important;
|
| 351 |
position: absolute !important;
|
| 352 |
top: 100% !important;
|
| 353 |
left: 0 !important;
|
| 354 |
-
/* Add hover persistence */
|
| 355 |
pointer-events: auto !important;
|
| 356 |
}
|
| 357 |
.compact-dropdown:hover .gr-dropdown-menu {
|
|
@@ -363,59 +278,47 @@ button:hover {
|
|
| 363 |
background: transparent !important;
|
| 364 |
}
|
| 365 |
.compact-dropdown .gr-dropdown-menu option:hover {
|
| 366 |
-
background: rgba(255, 107, 107, 0.3) !important;
|
| 367 |
}
|
| 368 |
-
|
| 369 |
-
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
border
|
| 374 |
-
outline: none !important;
|
| 375 |
}
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
border-radius: 50% !important;
|
| 383 |
-
cursor: pointer !important;
|
| 384 |
-
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
|
| 385 |
}
|
| 386 |
-
.gr-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
border: 2px solid #ff6b6b !important;
|
| 391 |
-
border-radius: 50% !important;
|
| 392 |
-
cursor: pointer !important;
|
| 393 |
-
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
|
| 394 |
}
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
.
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
}
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
}
|
| 416 |
-
.compact-dropdown .gr-dropdown-menu {
|
| 417 |
-
max-height: 200px !important;
|
| 418 |
-
}
|
| 419 |
}
|
| 420 |
"""
|
| 421 |
|
|
|
|
| 161 |
OUTPUT_FORMATS = ['wav', 'flac', 'mp3', 'ogg', 'opus', 'm4a', 'aiff', 'ac3']
|
| 162 |
|
| 163 |
# CSS (unchanged from provided version)
|
| 164 |
+
css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
body {
|
| 166 |
+
background: linear-gradient(to bottom, rgba(45, 11, 11, 0.9), rgba(0, 0, 0, 0.8)), url('/content/logo.jpg') no-repeat center center fixed;
|
| 167 |
+
background-size: cover;
|
| 168 |
+
min-height: 100vh;
|
| 169 |
margin: 0;
|
| 170 |
+
padding: 1rem;
|
| 171 |
+
font-family: 'Poppins', sans-serif;
|
| 172 |
+
color: #C0C0C0;
|
| 173 |
+
overflow-x: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
}
|
| 175 |
.header-text {
|
| 176 |
text-align: center;
|
| 177 |
+
padding: 100px 20px 20px;
|
| 178 |
+
color: #ff4040;
|
| 179 |
+
font-size: 3rem;
|
| 180 |
+
font-weight: 900;
|
| 181 |
+
text-shadow: 0 0 10px rgba(255, 64, 64, 0.5);
|
| 182 |
+
z-index: 1500;
|
| 183 |
+
animation: text-glow 2s infinite;
|
|
|
|
|
|
|
|
|
|
| 184 |
}
|
| 185 |
+
.header-subtitle {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
text-align: center;
|
| 187 |
+
color: #C0C0C0;
|
| 188 |
+
font-size: 1.2rem;
|
| 189 |
+
font-weight: 300;
|
| 190 |
+
margin-top: -10px;
|
| 191 |
+
text-shadow: 0 0 5px rgba(255, 64, 64, 0.3);
|
| 192 |
+
}
|
| 193 |
+
.gr-tab {
|
| 194 |
+
background: rgba(128, 0, 0, 0.5) !important;
|
| 195 |
+
border-radius: 12px 12px 0 0 !important;
|
| 196 |
+
margin: 0 5px !important;
|
| 197 |
+
color: #C0C0C0 !important;
|
| 198 |
+
border: 1px solid #ff4040 !important;
|
| 199 |
+
z-index: 1500;
|
| 200 |
+
transition: background 0.3s ease, color 0.3s ease;
|
| 201 |
+
padding: 10px 20px !important;
|
| 202 |
+
font-size: 1.1rem !important;
|
| 203 |
}
|
| 204 |
button {
|
| 205 |
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
| 206 |
+
background: #800000 !important;
|
| 207 |
+
border: 1px solid #ff4040 !important;
|
| 208 |
+
color: #C0C0C0 !important;
|
| 209 |
border-radius: 8px !important;
|
| 210 |
padding: 8px 16px !important;
|
| 211 |
+
box-shadow: 0 2px 10px rgba(255, 64, 64, 0.3);
|
|
|
|
|
|
|
|
|
|
| 212 |
}
|
| 213 |
button:hover {
|
| 214 |
transform: scale(1.05) !important;
|
| 215 |
+
box-shadow: 0 10px 40px rgba(255, 64, 64, 0.7) !important;
|
| 216 |
+
background: #ff4040 !important;
|
| 217 |
}
|
| 218 |
.compact-upload.horizontal {
|
| 219 |
+
display: inline-flex !important;
|
| 220 |
align-items: center !important;
|
| 221 |
gap: 8px !important;
|
| 222 |
+
max-width: 400px !important;
|
| 223 |
+
height: 40px !important;
|
| 224 |
+
padding: 0 12px !important;
|
| 225 |
+
border: 1px solid #ff4040 !important;
|
| 226 |
+
background: rgba(128, 0, 0, 0.5) !important;
|
| 227 |
border-radius: 8px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
}
|
| 229 |
.compact-dropdown {
|
| 230 |
padding: 8px 12px !important;
|
| 231 |
border-radius: 8px !important;
|
| 232 |
+
border: 2px solid #ff6b6b !important; /* Match previous style */
|
| 233 |
+
background: rgba(46, 26, 71, 0.7) !important; /* Match previous style */
|
| 234 |
+
color: #e0e0e0 !important; /* Match previous style */
|
| 235 |
width: 100%;
|
| 236 |
font-size: 1rem !important;
|
| 237 |
transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
|
|
|
|
| 239 |
z-index: 100; /* Base z-index for dropdown */
|
| 240 |
}
|
| 241 |
.compact-dropdown:hover {
|
| 242 |
+
border-color: #ff8787 !important; /* Lighter shade for hover */
|
| 243 |
box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4) !important;
|
| 244 |
}
|
| 245 |
.compact-dropdown select, .compact-dropdown .gr-dropdown {
|
|
|
|
| 254 |
-moz-appearance: none !important;
|
| 255 |
}
|
| 256 |
.compact-dropdown .gr-dropdown-menu {
|
| 257 |
+
background: rgba(46, 26, 71, 0.95) !important; /* Match previous style */
|
| 258 |
+
border: 2px solid #ff6b6b !important; /* Match previous style */
|
| 259 |
border-radius: 8px !important;
|
| 260 |
color: #e0e0e0 !important;
|
| 261 |
max-height: 300px !important;
|
| 262 |
overflow-y: auto !important;
|
| 263 |
+
z-index: 300 !important; /* Ensure it stays above other elements */
|
| 264 |
width: 100% !important;
|
| 265 |
opacity: 1 !important;
|
| 266 |
visibility: visible !important;
|
| 267 |
position: absolute !important;
|
| 268 |
top: 100% !important;
|
| 269 |
left: 0 !important;
|
|
|
|
| 270 |
pointer-events: auto !important;
|
| 271 |
}
|
| 272 |
.compact-dropdown:hover .gr-dropdown-menu {
|
|
|
|
| 278 |
background: transparent !important;
|
| 279 |
}
|
| 280 |
.compact-dropdown .gr-dropdown-menu option:hover {
|
| 281 |
+
background: rgba(255, 107, 107, 0.3) !important; /* Match hover effect */
|
| 282 |
}
|
| 283 |
+
#custom-progress {
|
| 284 |
+
margin-top: 10px;
|
| 285 |
+
padding: 10px;
|
| 286 |
+
background: rgba(128, 0, 0, 0.3);
|
| 287 |
+
border-radius: 8px;
|
| 288 |
+
border: 1px solid #ff4040;
|
|
|
|
| 289 |
}
|
| 290 |
+
#progress-bar {
|
| 291 |
+
height: 20px;
|
| 292 |
+
background: linear-gradient(to right, #6e8efb, #ff4040);
|
| 293 |
+
border-radius: 5px;
|
| 294 |
+
transition: width 0.5s ease-in-out;
|
| 295 |
+
max-width: 100% !important;
|
|
|
|
|
|
|
|
|
|
| 296 |
}
|
| 297 |
+
.gr-accordion {
|
| 298 |
+
background: rgba(128, 0, 0, 0.5) !important;
|
| 299 |
+
border-radius: 10px !important;
|
| 300 |
+
border: 1px solid #ff4040 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
}
|
| 302 |
+
.footer {
|
| 303 |
+
text-align: center;
|
| 304 |
+
padding: 20px;
|
| 305 |
+
color: #ff4040;
|
| 306 |
+
font-size: 14px;
|
| 307 |
+
margin-top: 40px;
|
| 308 |
+
background: rgba(128, 0, 0, 0.3);
|
| 309 |
+
border-top: 1px solid #ff4040;
|
| 310 |
+
}
|
| 311 |
+
#log-accordion {
|
| 312 |
+
max-height: 400px;
|
| 313 |
+
overflow-y: auto;
|
| 314 |
+
background: rgba(0, 0, 0, 0.7) !important;
|
| 315 |
+
padding: 10px;
|
| 316 |
+
border-radius: 8px;
|
| 317 |
+
}
|
| 318 |
+
@keyframes text-glow {
|
| 319 |
+
0% { text-shadow: 0 0 5px rgba(192, 192, 192, 0); }
|
| 320 |
+
50% { text-shadow: 0 0 15px rgba(192, 192, 192, 1); }
|
| 321 |
+
100% { text-shadow: 0 0 5px rgba(192, 192, 192, 0); }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 322 |
}
|
| 323 |
"""
|
| 324 |
|