TejAndrewsACC commited on
Commit
e941499
·
verified ·
1 Parent(s): cc3ebc0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +95 -1
app.py CHANGED
@@ -1349,6 +1349,99 @@ def respond(message, history, max_tokens, temperature, top_p):
1349
  response += token
1350
  yield response
1351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1352
  demo = gr.ChatInterface(
1353
  respond,
1354
  additional_inputs=[
@@ -1357,7 +1450,8 @@ demo = gr.ChatInterface(
1357
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Neural Activity")
1358
  ],
1359
  theme="TejAndrewsACC/zetaofficalthemeacc",
1360
-
 
1361
  )
1362
 
1363
  if __name__ == "__main__":
 
1349
  response += token
1350
  yield response
1351
 
1352
+ import gradio as gr
1353
+
1354
+ def respond(message, history):
1355
+ return "Response", history
1356
+
1357
+ css = """
1358
+ #chat-interface {
1359
+ animation: pulse 1.5s infinite, glass 3s infinite alternate;
1360
+ }
1361
+
1362
+ @keyframes pulse {
1363
+ 0% { transform: scale(1); opacity: 1; }
1364
+ 25% { transform: scale(1.05); opacity: 0.9; }
1365
+ 50% { transform: scale(1); opacity: 1; }
1366
+ 75% { transform: scale(1.05); opacity: 0.9; }
1367
+ 100% { transform: scale(1); opacity: 1; }
1368
+ }
1369
+
1370
+ @keyframes glass {
1371
+ 0% { background-color: rgba(0, 102, 255, 0.5); border-radius: 15px; }
1372
+ 25% { background-color: rgba(0, 150, 255, 0.7); border-radius: 20px; }
1373
+ 50% { background-color: rgba(0, 200, 255, 1); border-radius: 25px; }
1374
+ 75% { background-color: rgba(0, 150, 255, 0.7); border-radius: 30px; }
1375
+ 100% { background-color: rgba(0, 102, 255, 0.5); border-radius: 35px; }
1376
+ }
1377
+
1378
+ body {
1379
+ background-color: #001f2d;
1380
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
1381
+ color: #fff;
1382
+ }
1383
+
1384
+ .gradio-container {
1385
+ backdrop-filter: blur(10px);
1386
+ border-radius: 20px;
1387
+ padding: 20px;
1388
+ box-shadow: 0px 0px 30px rgba(0, 102, 255, 0.5);
1389
+ background: rgba(0, 0, 0, 0.5);
1390
+ transition: background 1s, border-radius 1s;
1391
+ }
1392
+
1393
+ .gradio-input {
1394
+ background-color: rgba(0, 102, 255, 0.3);
1395
+ border: 2px solid rgba(0, 102, 255, 0.6);
1396
+ border-radius: 10px;
1397
+ color: #fff;
1398
+ font-size: 16px;
1399
+ transition: background-color 0.5s, border 0.5s;
1400
+ }
1401
+
1402
+ .gradio-input:focus {
1403
+ background-color: rgba(0, 102, 255, 0.5);
1404
+ border: 2px solid rgba(0, 150, 255, 0.8);
1405
+ }
1406
+
1407
+ .gradio-button {
1408
+ background: rgba(0, 102, 255, 0.6);
1409
+ border: 2px solid rgba(0, 102, 255, 1);
1410
+ border-radius: 12px;
1411
+ color: #fff;
1412
+ font-size: 18px;
1413
+ transition: background 0.3s, transform 0.3s;
1414
+ }
1415
+
1416
+ .gradio-button:hover {
1417
+ background: rgba(0, 150, 255, 1);
1418
+ transform: scale(1.05);
1419
+ }
1420
+
1421
+ .gradio-button:active {
1422
+ background: rgba(0, 200, 255, 1);
1423
+ transform: scale(0.95);
1424
+ }
1425
+
1426
+ .gradio-slider {
1427
+ color: #fff;
1428
+ }
1429
+
1430
+ .gradio-slider .slider-container {
1431
+ background: rgba(0, 102, 255, 0.3);
1432
+ border-radius: 8px;
1433
+ border: 1px solid rgba(0, 102, 255, 0.5);
1434
+ }
1435
+
1436
+ .gradio-slider .slider-container .gradio-slider__track {
1437
+ background: rgba(0, 150, 255, 0.5);
1438
+ }
1439
+
1440
+ .gradio-slider .slider-container .gradio-slider__thumb {
1441
+ background-color: rgba(0, 200, 255, 1);
1442
+ }
1443
+ """
1444
+
1445
  demo = gr.ChatInterface(
1446
  respond,
1447
  additional_inputs=[
 
1450
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Neural Activity")
1451
  ],
1452
  theme="TejAndrewsACC/zetaofficalthemeacc",
1453
+ css=css,
1454
+ elem_id="chat-interface"
1455
  )
1456
 
1457
  if __name__ == "__main__":