Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -106,7 +106,7 @@ def respond(message, history):
|
|
| 106 |
yield response
|
| 107 |
|
| 108 |
|
| 109 |
-
# 🎨 Custom CSS (
|
| 110 |
CUSTOM_CSS = """
|
| 111 |
<style>
|
| 112 |
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
|
|
@@ -126,9 +126,10 @@ html, body {
|
|
| 126 |
background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%) !important;
|
| 127 |
color: var(--terminal-fg);
|
| 128 |
font-family: var(--terminal-font);
|
| 129 |
-
font-size: 1.
|
| 130 |
box-sizing: border-box;
|
| 131 |
-
overflow: hidden;
|
|
|
|
| 132 |
}
|
| 133 |
|
| 134 |
/* Gradio ana container - şeffaf ve üstte */
|
|
@@ -136,9 +137,10 @@ html, body {
|
|
| 136 |
background: transparent !important;
|
| 137 |
position: relative;
|
| 138 |
z-index: 2;
|
|
|
|
| 139 |
}
|
| 140 |
|
| 141 |
-
/* Parallax star layers */
|
| 142 |
#stars,
|
| 143 |
#stars2,
|
| 144 |
#stars3 {
|
|
@@ -160,7 +162,7 @@ html, body {
|
|
| 160 |
1400px 160px #FFF,
|
| 161 |
1600px 100px #FFF,
|
| 162 |
1800px 220px #FFF;
|
| 163 |
-
animation: animStar
|
| 164 |
z-index: 0;
|
| 165 |
}
|
| 166 |
|
|
@@ -175,7 +177,7 @@ html, body {
|
|
| 175 |
1350px 260px #FFF,
|
| 176 |
1550px 360px #FFF,
|
| 177 |
1700px 300px #FFF;
|
| 178 |
-
animation-duration:
|
| 179 |
}
|
| 180 |
|
| 181 |
#stars3 {
|
|
@@ -187,7 +189,7 @@ html, body {
|
|
| 187 |
1250px 480px #FFF,
|
| 188 |
1500px 540px #FFF,
|
| 189 |
1750px 500px #FFF;
|
| 190 |
-
animation-duration:
|
| 191 |
}
|
| 192 |
|
| 193 |
#stars::after,
|
|
@@ -228,9 +230,9 @@ html, body {
|
|
| 228 |
height: 3px;
|
| 229 |
background: linear-gradient(90deg, #ff00ff, #00ffff, #fffb00);
|
| 230 |
background-size: 200% 100%;
|
| 231 |
-
animation: synthwave-bar
|
| 232 |
-
opacity: 0.
|
| 233 |
-
box-shadow: 0 0 10px rgba(255, 0, 255, 0.
|
| 234 |
}
|
| 235 |
|
| 236 |
@keyframes synthwave-bar {
|
|
@@ -262,7 +264,7 @@ html, body {
|
|
| 262 |
font-family: var(--terminal-font) !important;
|
| 263 |
}
|
| 264 |
|
| 265 |
-
/* Intro boot screen */
|
| 266 |
.pb-intro {
|
| 267 |
font-family: var(--terminal-font);
|
| 268 |
color: var(--terminal-fg);
|
|
@@ -274,21 +276,20 @@ html, body {
|
|
| 274 |
max-width: 780px;
|
| 275 |
border-radius: 8px;
|
| 276 |
white-space: pre-line;
|
| 277 |
-
animation: intro-fade 7s forwards;
|
| 278 |
}
|
| 279 |
|
| 280 |
.pb-intro-line {
|
| 281 |
opacity: 0;
|
| 282 |
-
animation: intro-type 1.
|
| 283 |
}
|
| 284 |
|
| 285 |
.pb-intro-line:nth-child(1) { animation-delay: 0.2s; }
|
| 286 |
-
.pb-intro-line:nth-child(2) { animation-delay: 1.
|
| 287 |
-
.pb-intro-line:nth-child(3) { animation-delay:
|
| 288 |
|
| 289 |
.pb-intro-line:nth-child(3)::after {
|
| 290 |
content: " _";
|
| 291 |
-
animation: caret-blink
|
| 292 |
}
|
| 293 |
|
| 294 |
@keyframes intro-type {
|
|
@@ -301,12 +302,7 @@ html, body {
|
|
| 301 |
51%, 100% { opacity: 0; }
|
| 302 |
}
|
| 303 |
|
| 304 |
-
|
| 305 |
-
0%, 75% { opacity: 1; }
|
| 306 |
-
100% { opacity: 0; visibility: hidden; }
|
| 307 |
-
}
|
| 308 |
-
|
| 309 |
-
/* Chat container (CRT + NeoGlow) */
|
| 310 |
#prettybird-chat .gr-chatbot {
|
| 311 |
background-color: rgba(0, 0, 0, 0.9) !important;
|
| 312 |
border: 2px solid var(--terminal-fg);
|
|
@@ -318,21 +314,21 @@ html, body {
|
|
| 318 |
color: var(--terminal-fg) !important;
|
| 319 |
position: relative;
|
| 320 |
overflow: hidden;
|
| 321 |
-
transform: perspective(900px) rotateX(
|
| 322 |
-
filter: contrast(1.
|
| 323 |
}
|
| 324 |
|
| 325 |
-
/* CRT scanlines */
|
| 326 |
#prettybird-chat .gr-chatbot::before {
|
| 327 |
content: "";
|
| 328 |
position: absolute;
|
| 329 |
inset: 0;
|
| 330 |
background: repeating-linear-gradient(
|
| 331 |
to bottom,
|
| 332 |
-
rgba(0, 0, 0, 0.
|
| 333 |
-
rgba(0, 0, 0, 0.
|
| 334 |
transparent 1px,
|
| 335 |
-
transparent
|
| 336 |
);
|
| 337 |
mix-blend-mode: soft-light;
|
| 338 |
pointer-events: none;
|
|
@@ -345,8 +341,8 @@ html, body {
|
|
| 345 |
background: transparent !important;
|
| 346 |
font-family: var(--terminal-font) !important;
|
| 347 |
color: var(--terminal-fg) !important;
|
| 348 |
-
text-shadow: 0 0
|
| 349 |
-
animation: text-flicker
|
| 350 |
}
|
| 351 |
|
| 352 |
/* User vs assistant baloncuk borderları kaldır */
|
|
@@ -378,14 +374,11 @@ html, body {
|
|
| 378 |
letter-spacing: 0.08em;
|
| 379 |
}
|
| 380 |
|
| 381 |
-
/* Flicker */
|
| 382 |
@keyframes text-flicker {
|
| 383 |
-
0%,
|
| 384 |
-
|
| 385 |
-
}
|
| 386 |
-
20%, 24%, 55% {
|
| 387 |
-
opacity: 0.85;
|
| 388 |
-
}
|
| 389 |
}
|
| 390 |
|
| 391 |
/* Side card (BCE açıklaması + Consciousness Meter) */
|
|
@@ -436,23 +429,59 @@ html, body {
|
|
| 436 |
inset: 0;
|
| 437 |
background: linear-gradient(90deg, #00ff41, #bfff00);
|
| 438 |
transform-origin: left;
|
| 439 |
-
animation: meter-pulse
|
| 440 |
}
|
| 441 |
|
| 442 |
.bce-meter-fill.stability {
|
| 443 |
-
animation-delay: 0.
|
| 444 |
}
|
| 445 |
|
| 446 |
.bce-meter-fill.creativity {
|
| 447 |
-
animation-delay:
|
| 448 |
}
|
| 449 |
|
| 450 |
@keyframes meter-pulse {
|
| 451 |
0% { transform: scaleX(0.6); opacity: 0.9; }
|
| 452 |
-
25% { transform: scaleX(0.
|
| 453 |
-
50% { transform: scaleX(0.
|
| 454 |
-
75% { transform: scaleX(0.
|
| 455 |
-
100% { transform: scaleX(0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 456 |
}
|
| 457 |
</style>
|
| 458 |
"""
|
|
@@ -468,7 +497,7 @@ with gr.Blocks(title="PrettyBird – Behavioral Consciousness Engine (BCE)") as
|
|
| 468 |
|
| 469 |
gr.Markdown(HEADER_MD)
|
| 470 |
|
| 471 |
-
# Boot animasyonu
|
| 472 |
gr.HTML("""
|
| 473 |
<div class="pb-intro">
|
| 474 |
<div class="pb-intro-line">INITIALIZING BCE CORE...</div>
|
|
|
|
| 106 |
yield response
|
| 107 |
|
| 108 |
|
| 109 |
+
# 🎨 Custom CSS (daha yavaş animasyon + responsive + kalıcı boot ekranı)
|
| 110 |
CUSTOM_CSS = """
|
| 111 |
<style>
|
| 112 |
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
|
|
|
|
| 126 |
background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%) !important;
|
| 127 |
color: var(--terminal-fg);
|
| 128 |
font-family: var(--terminal-font);
|
| 129 |
+
font-size: 1.05rem;
|
| 130 |
box-sizing: border-box;
|
| 131 |
+
overflow-x: hidden;
|
| 132 |
+
overflow-y: auto;
|
| 133 |
}
|
| 134 |
|
| 135 |
/* Gradio ana container - şeffaf ve üstte */
|
|
|
|
| 137 |
background: transparent !important;
|
| 138 |
position: relative;
|
| 139 |
z-index: 2;
|
| 140 |
+
padding: 8px;
|
| 141 |
}
|
| 142 |
|
| 143 |
+
/* Parallax star layers - animasyon yavaşlatıldı */
|
| 144 |
#stars,
|
| 145 |
#stars2,
|
| 146 |
#stars3 {
|
|
|
|
| 162 |
1400px 160px #FFF,
|
| 163 |
1600px 100px #FFF,
|
| 164 |
1800px 220px #FFF;
|
| 165 |
+
animation: animStar 90s linear infinite;
|
| 166 |
z-index: 0;
|
| 167 |
}
|
| 168 |
|
|
|
|
| 177 |
1350px 260px #FFF,
|
| 178 |
1550px 360px #FFF,
|
| 179 |
1700px 300px #FFF;
|
| 180 |
+
animation-duration: 140s;
|
| 181 |
}
|
| 182 |
|
| 183 |
#stars3 {
|
|
|
|
| 189 |
1250px 480px #FFF,
|
| 190 |
1500px 540px #FFF,
|
| 191 |
1750px 500px #FFF;
|
| 192 |
+
animation-duration: 200s;
|
| 193 |
}
|
| 194 |
|
| 195 |
#stars::after,
|
|
|
|
| 230 |
height: 3px;
|
| 231 |
background: linear-gradient(90deg, #ff00ff, #00ffff, #fffb00);
|
| 232 |
background-size: 200% 100%;
|
| 233 |
+
animation: synthwave-bar 8s ease-in-out infinite;
|
| 234 |
+
opacity: 0.8;
|
| 235 |
+
box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
|
| 236 |
}
|
| 237 |
|
| 238 |
@keyframes synthwave-bar {
|
|
|
|
| 264 |
font-family: var(--terminal-font) !important;
|
| 265 |
}
|
| 266 |
|
| 267 |
+
/* Intro boot screen - kalıcı, sadece satırlar sırasıyla beliriyor */
|
| 268 |
.pb-intro {
|
| 269 |
font-family: var(--terminal-font);
|
| 270 |
color: var(--terminal-fg);
|
|
|
|
| 276 |
max-width: 780px;
|
| 277 |
border-radius: 8px;
|
| 278 |
white-space: pre-line;
|
|
|
|
| 279 |
}
|
| 280 |
|
| 281 |
.pb-intro-line {
|
| 282 |
opacity: 0;
|
| 283 |
+
animation: intro-type 1.2s forwards;
|
| 284 |
}
|
| 285 |
|
| 286 |
.pb-intro-line:nth-child(1) { animation-delay: 0.2s; }
|
| 287 |
+
.pb-intro-line:nth-child(2) { animation-delay: 1.2s; }
|
| 288 |
+
.pb-intro-line:nth-child(3) { animation-delay: 2.2s; }
|
| 289 |
|
| 290 |
.pb-intro-line:nth-child(3)::after {
|
| 291 |
content: " _";
|
| 292 |
+
animation: caret-blink 1s infinite;
|
| 293 |
}
|
| 294 |
|
| 295 |
@keyframes intro-type {
|
|
|
|
| 302 |
51%, 100% { opacity: 0; }
|
| 303 |
}
|
| 304 |
|
| 305 |
+
/* Chat container (CRT + NeoGlow, ama çok agresif değil) */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
#prettybird-chat .gr-chatbot {
|
| 307 |
background-color: rgba(0, 0, 0, 0.9) !important;
|
| 308 |
border: 2px solid var(--terminal-fg);
|
|
|
|
| 314 |
color: var(--terminal-fg) !important;
|
| 315 |
position: relative;
|
| 316 |
overflow: hidden;
|
| 317 |
+
transform: perspective(900px) rotateX(0.7deg);
|
| 318 |
+
filter: contrast(1.03) saturate(1.1);
|
| 319 |
}
|
| 320 |
|
| 321 |
+
/* CRT scanlines - çok hafif */
|
| 322 |
#prettybird-chat .gr-chatbot::before {
|
| 323 |
content: "";
|
| 324 |
position: absolute;
|
| 325 |
inset: 0;
|
| 326 |
background: repeating-linear-gradient(
|
| 327 |
to bottom,
|
| 328 |
+
rgba(0, 0, 0, 0.10),
|
| 329 |
+
rgba(0, 0, 0, 0.10) 1px,
|
| 330 |
transparent 1px,
|
| 331 |
+
transparent 4px
|
| 332 |
);
|
| 333 |
mix-blend-mode: soft-light;
|
| 334 |
pointer-events: none;
|
|
|
|
| 341 |
background: transparent !important;
|
| 342 |
font-family: var(--terminal-font) !important;
|
| 343 |
color: var(--terminal-fg) !important;
|
| 344 |
+
text-shadow: 0 0 4px var(--terminal-glow);
|
| 345 |
+
animation: text-flicker 4s infinite alternate;
|
| 346 |
}
|
| 347 |
|
| 348 |
/* User vs assistant baloncuk borderları kaldır */
|
|
|
|
| 374 |
letter-spacing: 0.08em;
|
| 375 |
}
|
| 376 |
|
| 377 |
+
/* Flicker daha sakin */
|
| 378 |
@keyframes text-flicker {
|
| 379 |
+
0%, 80%, 100% { opacity: 1; }
|
| 380 |
+
40% { opacity: 0.92; }
|
| 381 |
+
60% { opacity: 0.96; }
|
|
|
|
|
|
|
|
|
|
| 382 |
}
|
| 383 |
|
| 384 |
/* Side card (BCE açıklaması + Consciousness Meter) */
|
|
|
|
| 429 |
inset: 0;
|
| 430 |
background: linear-gradient(90deg, #00ff41, #bfff00);
|
| 431 |
transform-origin: left;
|
| 432 |
+
animation: meter-pulse 10s ease-in-out infinite;
|
| 433 |
}
|
| 434 |
|
| 435 |
.bce-meter-fill.stability {
|
| 436 |
+
animation-delay: 0.8s;
|
| 437 |
}
|
| 438 |
|
| 439 |
.bce-meter-fill.creativity {
|
| 440 |
+
animation-delay: 1.6s;
|
| 441 |
}
|
| 442 |
|
| 443 |
@keyframes meter-pulse {
|
| 444 |
0% { transform: scaleX(0.6); opacity: 0.9; }
|
| 445 |
+
25% { transform: scaleX(0.82); opacity: 1; }
|
| 446 |
+
50% { transform: scaleX(0.72); opacity: 0.95; }
|
| 447 |
+
75% { transform: scaleX(0.88); opacity: 1; }
|
| 448 |
+
100% { transform: scaleX(0.65); opacity: 0.9; }
|
| 449 |
+
}
|
| 450 |
+
|
| 451 |
+
/* 📱 Responsive düzen: mobil & tablet uyumu */
|
| 452 |
+
@media (max-width: 900px) {
|
| 453 |
+
.pb-header h1 {
|
| 454 |
+
font-size: 1.35rem;
|
| 455 |
+
}
|
| 456 |
+
.pb-logo {
|
| 457 |
+
max-width: 180px;
|
| 458 |
+
}
|
| 459 |
+
.gradio-container {
|
| 460 |
+
padding: 6px;
|
| 461 |
+
}
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
@media (max-width: 768px) {
|
| 465 |
+
.pb-header {
|
| 466 |
+
margin-top: 6px;
|
| 467 |
+
}
|
| 468 |
+
.pb-header h1 {
|
| 469 |
+
font-size: 1.2rem;
|
| 470 |
+
}
|
| 471 |
+
.pb-subtitle {
|
| 472 |
+
font-size: 0.8rem;
|
| 473 |
+
}
|
| 474 |
+
.pb-logo {
|
| 475 |
+
max-width: 150px;
|
| 476 |
+
width: 50%;
|
| 477 |
+
}
|
| 478 |
+
#prettybird-chat .gr-chatbot {
|
| 479 |
+
transform: none; /* Mobilde CRT warp yok, düz olsun */
|
| 480 |
+
filter: contrast(1.0) saturate(1.0);
|
| 481 |
+
}
|
| 482 |
+
.pb-side-card {
|
| 483 |
+
margin-top: 10px;
|
| 484 |
+
}
|
| 485 |
}
|
| 486 |
</style>
|
| 487 |
"""
|
|
|
|
| 497 |
|
| 498 |
gr.Markdown(HEADER_MD)
|
| 499 |
|
| 500 |
+
# Boot animasyonu (artık kaybolmuyor)
|
| 501 |
gr.HTML("""
|
| 502 |
<div class="pb-intro">
|
| 503 |
<div class="pb-intro-line">INITIALIZING BCE CORE...</div>
|