Spaces:
Running
Running
Prometech Computer Sciences Corp
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -119,78 +119,100 @@ CUSTOM_CSS = """
|
|
| 119 |
<style>
|
| 120 |
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
|
| 121 |
|
| 122 |
-
/*
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
|
|
|
| 127 |
}
|
| 128 |
|
| 129 |
-
/*
|
| 130 |
-
.
|
| 131 |
-
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
position: fixed;
|
| 134 |
top: 0;
|
| 135 |
left: 0;
|
| 136 |
-
width:
|
| 137 |
-
height:
|
| 138 |
-
background
|
| 139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
z-index: -3;
|
| 141 |
}
|
| 142 |
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
radial-gradient(3px 3px at 20px 40px, #bbb, transparent),
|
| 157 |
-
radial-gradient(3px 3px at 80px 100px, #bbb, transparent),
|
| 158 |
-
radial-gradient(3px 3px at 140px 50px, #bbb, transparent),
|
| 159 |
-
radial-gradient(3px 3px at 160px 160px, #bbb, transparent);
|
| 160 |
-
background-size: 250px 250px;
|
| 161 |
-
animation: pb-animStar 90s linear infinite;
|
| 162 |
-
}
|
| 163 |
-
|
| 164 |
-
.pb-stars3 {
|
| 165 |
-
background-image:
|
| 166 |
-
radial-gradient(4px 4px at 30px 120px, #777, transparent),
|
| 167 |
-
radial-gradient(4px 4px at 100px 40px, #777, transparent),
|
| 168 |
-
radial-gradient(4px 4px at 180px 100px, #777, transparent);
|
| 169 |
-
background-size: 300px 300px;
|
| 170 |
-
animation: pb-animStar 140s linear infinite;
|
| 171 |
}
|
| 172 |
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
}
|
| 177 |
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
}
|
| 183 |
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
}
|
| 188 |
|
| 189 |
-
/* Header
|
| 190 |
.pb-header {
|
| 191 |
text-align: center;
|
| 192 |
color: #f5f7ff;
|
| 193 |
-
font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
|
| 194 |
margin-bottom: 12px;
|
| 195 |
}
|
| 196 |
|
|
@@ -213,63 +235,69 @@ html, body, .gradio-container {
|
|
| 213 |
opacity: 0.8;
|
| 214 |
}
|
| 215 |
|
| 216 |
-
/* Terminal
|
| 217 |
-
#prettybird-chat {
|
| 218 |
-
font-family: 'VT323', monospace;
|
| 219 |
-
color: #00ff41;
|
| 220 |
-
}
|
| 221 |
|
| 222 |
#prettybird-chat .gr-chatbot {
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
|
|
|
|
|
|
| 229 |
}
|
| 230 |
|
| 231 |
-
/*
|
| 232 |
#prettybird-chat .gr-chat-message,
|
| 233 |
-
#prettybird-chat .
|
| 234 |
-
#prettybird-chat .
|
| 235 |
-
|
| 236 |
-
|
|
|
|
|
|
|
|
|
|
| 237 |
}
|
| 238 |
|
|
|
|
| 239 |
#prettybird-chat .gr-chat-message.user,
|
| 240 |
-
#prettybird-chat .gr-chat-message.assistant
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
box-shadow: none !important;
|
| 245 |
}
|
| 246 |
|
| 247 |
-
/* Input
|
| 248 |
#prettybird-chat textarea {
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
|
|
|
| 253 |
}
|
| 254 |
|
|
|
|
| 255 |
#prettybird-chat button {
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
|
|
|
|
|
|
| 262 |
}
|
| 263 |
|
| 264 |
-
/*
|
| 265 |
.pb-side-card {
|
| 266 |
-
background: rgba(0,0,0,0.
|
| 267 |
border-radius: 12px;
|
| 268 |
border: 1px solid rgba(0,255,65,0.4);
|
| 269 |
color: #d9ffe0;
|
| 270 |
padding: 16px 18px;
|
| 271 |
box-shadow: 0 0 12px rgba(0,0,0,0.9);
|
| 272 |
font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
|
|
|
|
| 273 |
}
|
| 274 |
|
| 275 |
.pb-side-card h3 {
|
|
@@ -277,27 +305,27 @@ html, body, .gradio-container {
|
|
| 277 |
color: #9affc0;
|
| 278 |
}
|
| 279 |
|
| 280 |
-
/*
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
}
|
| 285 |
-
|
| 286 |
-
.
|
| 287 |
-
|
| 288 |
}
|
| 289 |
</style>
|
| 290 |
"""
|
| 291 |
|
| 292 |
with gr.Blocks(title="PrettyBird – Behavioral Consciousness Engine (BCE)") as demo:
|
| 293 |
-
#
|
| 294 |
gr.HTML(CUSTOM_CSS)
|
| 295 |
gr.HTML("""
|
| 296 |
-
<div
|
| 297 |
-
<div
|
| 298 |
-
<div
|
| 299 |
""")
|
| 300 |
-
|
| 301 |
gr.Markdown(HEADER_MD)
|
| 302 |
|
| 303 |
with gr.Row():
|
|
@@ -311,5 +339,6 @@ with gr.Blocks(title="PrettyBird – Behavioral Consciousness Engine (BCE)") as
|
|
| 311 |
+ BCE_SHORT_TR +
|
| 312 |
'</p></div>')
|
| 313 |
|
|
|
|
| 314 |
if __name__ == "__main__":
|
| 315 |
demo.launch()
|
|
|
|
| 119 |
<style>
|
| 120 |
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
|
| 121 |
|
| 122 |
+
/* === Terminal Theme Variables === */
|
| 123 |
+
:root {
|
| 124 |
+
--terminal-bg: #0d0208;
|
| 125 |
+
--terminal-fg: #00ff41;
|
| 126 |
+
--terminal-glow: #00ff41;
|
| 127 |
+
--terminal-font: 'VT323', monospace;
|
| 128 |
}
|
| 129 |
|
| 130 |
+
/* Body / root */
|
| 131 |
+
html, body, .gradio-container {
|
| 132 |
+
height: 100%;
|
| 133 |
+
margin: 0;
|
| 134 |
+
padding: 0;
|
| 135 |
+
background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%) !important;
|
| 136 |
+
color: var(--terminal-fg);
|
| 137 |
+
font-family: var(--terminal-font);
|
| 138 |
+
font-size: 1.1rem;
|
| 139 |
+
box-sizing: border-box;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
/* Parallax star layers (CSS versiyon) */
|
| 143 |
+
#stars,
|
| 144 |
+
#stars2,
|
| 145 |
+
#stars3 {
|
| 146 |
position: fixed;
|
| 147 |
top: 0;
|
| 148 |
left: 0;
|
| 149 |
+
width: 1px;
|
| 150 |
+
height: 1px;
|
| 151 |
+
background: transparent;
|
| 152 |
+
box-shadow:
|
| 153 |
+
50px 50px #FFF,
|
| 154 |
+
100px 150px #FFF,
|
| 155 |
+
200px 80px #FFF,
|
| 156 |
+
350px 120px #FFF,
|
| 157 |
+
600px 20px #FFF,
|
| 158 |
+
800px 200px #FFF,
|
| 159 |
+
1000px 180px #FFF,
|
| 160 |
+
1200px 40px #FFF,
|
| 161 |
+
1400px 160px #FFF,
|
| 162 |
+
1600px 100px #FFF,
|
| 163 |
+
1800px 220px #FFF;
|
| 164 |
+
animation: animStar 60s linear infinite;
|
| 165 |
z-index: -3;
|
| 166 |
}
|
| 167 |
|
| 168 |
+
#stars2 {
|
| 169 |
+
box-shadow:
|
| 170 |
+
75px 200px #FFF,
|
| 171 |
+
250px 300px #FFF,
|
| 172 |
+
450px 250px #FFF,
|
| 173 |
+
650px 350px #FFF,
|
| 174 |
+
900px 280px #FFF,
|
| 175 |
+
1150px 320px #FFF,
|
| 176 |
+
1350px 260px #FFF,
|
| 177 |
+
1550px 360px #FFF,
|
| 178 |
+
1700px 300px #FFF;
|
| 179 |
+
animation-duration: 100s;
|
| 180 |
+
z-index: -4;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
}
|
| 182 |
|
| 183 |
+
#stars3 {
|
| 184 |
+
box-shadow:
|
| 185 |
+
150px 400px #FFF,
|
| 186 |
+
400px 500px #FFF,
|
| 187 |
+
700px 450px #FFF,
|
| 188 |
+
950px 520px #FFF,
|
| 189 |
+
1250px 480px #FFF,
|
| 190 |
+
1500px 540px #FFF,
|
| 191 |
+
1750px 500px #FFF;
|
| 192 |
+
animation-duration: 140s;
|
| 193 |
+
z-index: -5;
|
| 194 |
}
|
| 195 |
|
| 196 |
+
#stars::after,
|
| 197 |
+
#stars2::after,
|
| 198 |
+
#stars3::after {
|
| 199 |
+
content: " ";
|
| 200 |
+
position: absolute;
|
| 201 |
+
top: 2000px;
|
| 202 |
+
width: inherit;
|
| 203 |
+
height: inherit;
|
| 204 |
+
box-shadow: inherit;
|
| 205 |
}
|
| 206 |
|
| 207 |
+
@keyframes animStar {
|
| 208 |
+
from { transform: translateY(0px); }
|
| 209 |
+
to { transform: translateY(-2000px); }
|
| 210 |
}
|
| 211 |
|
| 212 |
+
/* Header */
|
| 213 |
.pb-header {
|
| 214 |
text-align: center;
|
| 215 |
color: #f5f7ff;
|
|
|
|
| 216 |
margin-bottom: 12px;
|
| 217 |
}
|
| 218 |
|
|
|
|
| 235 |
opacity: 0.8;
|
| 236 |
}
|
| 237 |
|
| 238 |
+
/* === Terminal Container Style for Gradio Chat === */
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
|
| 240 |
#prettybird-chat .gr-chatbot {
|
| 241 |
+
background-color: rgba(0, 0, 0, 0.9) !important;
|
| 242 |
+
border: 2px solid var(--terminal-fg);
|
| 243 |
+
box-shadow: 0 0 10px var(--terminal-glow),
|
| 244 |
+
0 0 20px var(--terminal-glow) inset;
|
| 245 |
+
padding: 10px;
|
| 246 |
+
border-radius: 12px;
|
| 247 |
+
font-family: var(--terminal-font) !important;
|
| 248 |
+
color: var(--terminal-fg) !important;
|
| 249 |
}
|
| 250 |
|
| 251 |
+
/* Chat messages */
|
| 252 |
#prettybird-chat .gr-chat-message,
|
| 253 |
+
#prettybird-chat .gr-markdown,
|
| 254 |
+
#prettybird-chat .prose {
|
| 255 |
+
background: transparent !important;
|
| 256 |
+
font-family: var(--terminal-font) !important;
|
| 257 |
+
color: var(--terminal-fg) !important;
|
| 258 |
+
text-shadow: 0 0 5px var(--terminal-glow);
|
| 259 |
+
animation: text-flicker 2s infinite alternate;
|
| 260 |
}
|
| 261 |
|
| 262 |
+
/* User vs assistant baloncuk borderları kaldır, düz terminal gibi olsun */
|
| 263 |
#prettybird-chat .gr-chat-message.user,
|
| 264 |
+
#prettybird-chat .gr-chat-message.assistant {
|
| 265 |
+
box-shadow: none !important;
|
| 266 |
+
border-radius: 0 !important;
|
| 267 |
+
border: none !important;
|
|
|
|
| 268 |
}
|
| 269 |
|
| 270 |
+
/* Input alanı */
|
| 271 |
#prettybird-chat textarea {
|
| 272 |
+
background-color: rgba(0,0,0,0.9) !important;
|
| 273 |
+
border: 1px solid var(--terminal-fg) !important;
|
| 274 |
+
color: var(--terminal-fg) !important;
|
| 275 |
+
font-family: var(--terminal-font) !important;
|
| 276 |
+
resize: none !important;
|
| 277 |
}
|
| 278 |
|
| 279 |
+
/* Buton */
|
| 280 |
#prettybird-chat button {
|
| 281 |
+
border-radius: 0 !important;
|
| 282 |
+
border: 1px solid var(--terminal-fg) !important;
|
| 283 |
+
background: #000 !important;
|
| 284 |
+
color: var(--terminal-fg) !important;
|
| 285 |
+
font-family: var(--terminal-font) !important;
|
| 286 |
+
box-shadow: 0 0 8px var(--terminal-glow);
|
| 287 |
+
text-transform: uppercase;
|
| 288 |
+
letter-spacing: 0.08em;
|
| 289 |
}
|
| 290 |
|
| 291 |
+
/* Side card (BCE açıklaması) */
|
| 292 |
.pb-side-card {
|
| 293 |
+
background-color: rgba(0,0,0,0.9);
|
| 294 |
border-radius: 12px;
|
| 295 |
border: 1px solid rgba(0,255,65,0.4);
|
| 296 |
color: #d9ffe0;
|
| 297 |
padding: 16px 18px;
|
| 298 |
box-shadow: 0 0 12px rgba(0,0,0,0.9);
|
| 299 |
font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
|
| 300 |
+
font-size: 0.9rem;
|
| 301 |
}
|
| 302 |
|
| 303 |
.pb-side-card h3 {
|
|
|
|
| 305 |
color: #9affc0;
|
| 306 |
}
|
| 307 |
|
| 308 |
+
/* Flicker + cursor vibes */
|
| 309 |
+
@keyframes text-flicker {
|
| 310 |
+
0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
|
| 311 |
+
opacity: 1;
|
| 312 |
+
}
|
| 313 |
+
20%, 24%, 55% {
|
| 314 |
+
opacity: 0.85;
|
| 315 |
+
}
|
| 316 |
}
|
| 317 |
</style>
|
| 318 |
"""
|
| 319 |
|
| 320 |
with gr.Blocks(title="PrettyBird – Behavioral Consciousness Engine (BCE)") as demo:
|
| 321 |
+
# CSS + star layers
|
| 322 |
gr.HTML(CUSTOM_CSS)
|
| 323 |
gr.HTML("""
|
| 324 |
+
<div id="stars"></div>
|
| 325 |
+
<div id="stars2"></div>
|
| 326 |
+
<div id="stars3"></div>
|
| 327 |
""")
|
| 328 |
+
|
| 329 |
gr.Markdown(HEADER_MD)
|
| 330 |
|
| 331 |
with gr.Row():
|
|
|
|
| 339 |
+ BCE_SHORT_TR +
|
| 340 |
'</p></div>')
|
| 341 |
|
| 342 |
+
|
| 343 |
if __name__ == "__main__":
|
| 344 |
demo.launch()
|