Adi12345 commited on
Commit
ff2f67f
·
verified ·
1 Parent(s): a4f4d66

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +411 -17
app.py CHANGED
@@ -393,20 +393,414 @@ def load_paper_topic() -> str:
393
 
394
  BASE_CSS = r"""
395
  :root {
396
- --bg:#ffffff; --panel:#ffffff; --line:rgba(0,0,0,.12); --text:#111111;
397
- --muted:#5b5b5b; --soft:rgba(0,0,0,.62); --gold:#ff6600; --teal:#17b8a6;
398
- --blue:#628dff; --chosen:#ff7a1a; --idle:#b8d8ff; --idle-stroke:#5e8fe6;
399
- --query-node:#ffd8b3; --paper-node:#d7f6f2; --upload-node:#e7defe;
400
- --shadow:0 16px 40px rgba(0,0,0,.12);
401
- }
402
- html,body,.gradio-container{background:#ffffff !important;font-family:Inter,ui-sans-serif,system-ui,sans-serif;}
403
- .gradio-container{max-width:1640px !important;padding:20px !important;}
404
- #dvnc-shell{border:1px solid var(--line);border-radius:28px;overflow:hidden;background:#ffffff;box-shadow:var(--shadow);padding:20px 22px 22px;}
405
- .hero-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-bottom:12px;border-bottom:1px solid rgba(0,0,0,.06);margin-bottom:16px;}
406
- .brand{display:flex;align-items:center;gap:14px;}
407
- .logo{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;color:var(--gold);background:linear-gradient(135deg,rgba(255,122,26,.12),rgba(23,184,166,.10));border:1px solid rgba(0,0,0,.08);}
408
- .brand h1{font-size:1.05rem;margin:0;font-weight:700;letter-spacing:.12em;text-transform:uppercase;}
409
- .brand p{margin:3px 0 0;color:var(--muted);font-size:.84rem;}
410
- .status{display:flex;gap:10px;align-items:center;color:var(--soft);font-size:.85rem;}
411
- .status-dot{width:10px;height:10px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 6px rgba(23,184,166,.10),0 0 14px rgba(23,184,166,.25);}
412
- .panel{background:#ffffff;border:1px solid var(--line);border-radius:22px;box-shadow:inset 0 1px 0 rgba(255,255,255,.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
393
 
394
  BASE_CSS = r"""
395
  :root {
396
+ --bg: #ffffff;
397
+ --panel: #ffffff;
398
+ --line: rgba(0,0,0,.12);
399
+ --text: #111111;
400
+ --muted: #5b5b5b;
401
+ --soft: rgba(0,0,0,.62);
402
+ --gold: #ff6600;
403
+ --teal: #17b8a6;
404
+ --blue: #628dff;
405
+ --chosen: #ff7a1a;
406
+ --idle: #b8d8ff;
407
+ --idle-stroke: #5e8fe6;
408
+ --query-node: #ffd8b3;
409
+ --paper-node: #d7f6f2;
410
+ --upload-node: #e7defe;
411
+ --shadow: 0 16px 40px rgba(0,0,0,.12);
412
+ }
413
+
414
+ html, body, .gradio-container {
415
+ background: #ffffff !important;
416
+ font-family: Inter, ui-sans-serif, system-ui, sans-serif;
417
+ }
418
+
419
+ .gradio-container {
420
+ max-width: 1640px !important;
421
+ padding: 20px !important;
422
+ }
423
+
424
+ #dvnc-shell {
425
+ border: 1px solid var(--line);
426
+ border-radius: 28px;
427
+ overflow: hidden;
428
+ background: #ffffff;
429
+ box-shadow: var(--shadow);
430
+ padding: 20px 22px 22px;
431
+ }
432
+
433
+ .hero-bar {
434
+ display: flex;
435
+ justify-content: space-between;
436
+ align-items: center;
437
+ gap: 16px;
438
+ padding-bottom: 12px;
439
+ border-bottom: 1px solid rgba(0,0,0,.06);
440
+ margin-bottom: 16px;
441
+ }
442
+
443
+ .brand {
444
+ display: flex;
445
+ align-items: center;
446
+ gap: 14px;
447
+ }
448
+
449
+ .logo {
450
+ width: 42px;
451
+ height: 42px;
452
+ border-radius: 14px;
453
+ display: grid;
454
+ place-items: center;
455
+ color: var(--gold);
456
+ background: linear-gradient(135deg, rgba(255,122,26,.12), rgba(23,184,166,.10));
457
+ border: 1px solid rgba(0,0,0,.08);
458
+ }
459
+
460
+ .logo svg {
461
+ width: 24px;
462
+ height: 24px;
463
+ }
464
+
465
+ .brand h1 {
466
+ font-size: 1.05rem;
467
+ margin: 0;
468
+ font-weight: 700;
469
+ letter-spacing: .12em;
470
+ text-transform: uppercase;
471
+ }
472
+
473
+ .brand p {
474
+ margin: 3px 0 0;
475
+ color: var(--muted);
476
+ font-size: .84rem;
477
+ }
478
+
479
+ .status {
480
+ display: flex;
481
+ gap: 10px;
482
+ align-items: center;
483
+ color: var(--soft);
484
+ font-size: .85rem;
485
+ }
486
+
487
+ .status-dot {
488
+ width: 10px;
489
+ height: 10px;
490
+ border-radius: 50%;
491
+ background: var(--teal);
492
+ box-shadow: 0 0 0 6px rgba(23,184,166,.10), 0 0 14px rgba(23,184,166,.25);
493
+ }
494
+
495
+ .panel {
496
+ background: #ffffff;
497
+ border: 1px solid var(--line);
498
+ border-radius: 22px;
499
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
500
+ }
501
+
502
+ .querybox textarea,
503
+ .querybox input {
504
+ background: transparent !important;
505
+ color: var(--text) !important;
506
+ }
507
+
508
+ .querybox,
509
+ .querybox > div {
510
+ background: #ffffff !important;
511
+ border-radius: 18px !important;
512
+ border-color: var(--line) !important;
513
+ }
514
+
515
+ .chat-panel {
516
+ padding: 18px;
517
+ min-height: 280px;
518
+ }
519
+
520
+ .chat-thread {
521
+ display: flex;
522
+ flex-direction: column;
523
+ gap: 14px;
524
+ }
525
+
526
+ .bubble {
527
+ max-width: 88%;
528
+ padding: 16px 18px;
529
+ border-radius: 22px;
530
+ border: 1px solid var(--line);
531
+ }
532
+
533
+ .bubble p {
534
+ margin: 8px 0 0;
535
+ line-height: 1.6;
536
+ font-size: .96rem;
537
+ color: var(--text);
538
+ }
539
+
540
+ .bubble .role {
541
+ font-size: .72rem;
542
+ letter-spacing: .12em;
543
+ text-transform: uppercase;
544
+ color: var(--muted);
545
+ }
546
+
547
+ .bubble-user {
548
+ align-self: flex-end;
549
+ background: linear-gradient(135deg, rgba(98,141,255,.16), rgba(98,141,255,.08));
550
+ }
551
+
552
+ .bubble-ai {
553
+ align-self: flex-start;
554
+ background: #ffffff;
555
+ }
556
+
557
+ .bubble-system {
558
+ align-self: flex-start;
559
+ background: linear-gradient(135deg, rgba(255,122,26,.10), rgba(255,122,26,.04));
560
+ }
561
+
562
+ .model-switcher {
563
+ display: grid;
564
+ grid-template-columns: repeat(3,1fr);
565
+ gap: 12px;
566
+ }
567
+
568
+ .model-pill {
569
+ padding: 14px;
570
+ border: 1px solid var(--line);
571
+ border-radius: 18px;
572
+ display: flex;
573
+ flex-direction: column;
574
+ gap: 4px;
575
+ min-height: 98px;
576
+ background: #ffffff;
577
+ }
578
+
579
+ .model-pill.active {
580
+ border-color: rgba(255,122,26,.40);
581
+ background: linear-gradient(135deg, rgba(255,122,26,.10), rgba(255,255,255,.96));
582
+ }
583
+
584
+ .model-name {
585
+ font-weight: 650;
586
+ color: var(--text);
587
+ }
588
+
589
+ .model-tag {
590
+ font-size: .76rem;
591
+ text-transform: uppercase;
592
+ letter-spacing: .12em;
593
+ color: var(--gold);
594
+ }
595
+
596
+ .model-pill small {
597
+ color: var(--muted);
598
+ line-height: 1.45;
599
+ }
600
+
601
+ .brain-shell {
602
+ padding: 18px;
603
+ }
604
+
605
+ .brain-header {
606
+ display: flex;
607
+ justify-content: space-between;
608
+ align-items: flex-end;
609
+ gap: 16px;
610
+ margin-bottom: 10px;
611
+ }
612
+
613
+ .eyebrow {
614
+ font-size: .72rem;
615
+ letter-spacing: .16em;
616
+ text-transform: uppercase;
617
+ color: var(--gold);
618
+ margin: 0 0 4px;
619
+ }
620
+
621
+ .brain-header h3 {
622
+ margin: 0;
623
+ font-size: 1.12rem;
624
+ color: var(--text);
625
+ }
626
+
627
+ .brain-legend {
628
+ display: flex;
629
+ gap: 14px;
630
+ color: var(--muted);
631
+ font-size: .8rem;
632
+ flex-wrap: wrap;
633
+ }
634
+
635
+ .dot {
636
+ width: 10px;
637
+ height: 10px;
638
+ display: inline-block;
639
+ border-radius: 50%;
640
+ margin-right: 6px;
641
+ }
642
+
643
+ .dot-live {
644
+ background: var(--chosen);
645
+ box-shadow: 0 0 10px rgba(255,122,26,.35);
646
+ }
647
+
648
+ .dot-chosen {
649
+ background: var(--chosen);
650
+ }
651
+
652
+ .dot-idle {
653
+ background: var(--idle);
654
+ border: 1px solid var(--idle-stroke);
655
+ }
656
+
657
+ .dot-query {
658
+ background: var(--query-node);
659
+ border: 1px solid #de9e58;
660
+ }
661
+
662
+ .dot-paper {
663
+ background: var(--paper-node);
664
+ border: 1px solid #4fb3a5;
665
+ }
666
+
667
+ .dot-upload {
668
+ background: var(--upload-node);
669
+ border: 1px solid #8f73d9;
670
+ }
671
+
672
+ .timeline {
673
+ display: flex;
674
+ flex-direction: column;
675
+ gap: 10px;
676
+ }
677
+
678
+ .agent-step {
679
+ border: 1px solid var(--line);
680
+ border-radius: 18px;
681
+ background: #ffffff;
682
+ overflow: hidden;
683
+ }
684
+
685
+ .agent-summary {
686
+ list-style: none;
687
+ display: grid;
688
+ grid-template-columns: 42px 1fr;
689
+ gap: 12px;
690
+ align-items: center;
691
+ padding: 12px;
692
+ cursor: pointer;
693
+ }
694
+
695
+ .agent-summary::-webkit-details-marker {
696
+ display: none;
697
+ }
698
+
699
+ .agent-index {
700
+ width: 42px;
701
+ height: 42px;
702
+ border-radius: 14px;
703
+ display: grid;
704
+ place-items: center;
705
+ font-weight: 700;
706
+ color: var(--gold);
707
+ background: rgba(255,122,26,.08);
708
+ border: 1px solid rgba(255,122,26,.18);
709
+ }
710
+
711
+ .agent-head {
712
+ display: flex;
713
+ justify-content: space-between;
714
+ gap: 12px;
715
+ align-items: center;
716
+ }
717
+
718
+ .agent-head h4 {
719
+ margin: 0;
720
+ font-size: .98rem;
721
+ color: var(--text);
722
+ }
723
+
724
+ .agent-head span {
725
+ font-size: .72rem;
726
+ letter-spacing: .12em;
727
+ text-transform: uppercase;
728
+ color: var(--muted);
729
+ }
730
+
731
+ .agent-copy {
732
+ padding: 0 14px 16px 66px;
733
+ }
734
+
735
+ .agent-copy p {
736
+ margin: 0;
737
+ color: #2d2d2d;
738
+ font-size: .93rem;
739
+ line-height: 1.6;
740
+ }
741
+
742
+ .candidate-grid {
743
+ display: grid;
744
+ grid-template-columns: repeat(3,minmax(0,1fr));
745
+ gap: 18px;
746
+ }
747
+
748
+ .candidate-card {
749
+ background: none;
750
+ perspective: 1400px;
751
+ min-height: 330px;
752
+ }
753
+
754
+ .candidate-card-inner {
755
+ position: relative;
756
+ width: 100%;
757
+ min-height: 330px;
758
+ transition: transform .8s cubic-bezier(.2,.7,.1,1);
759
+ transform-style: preserve-3d;
760
+ }
761
+
762
+ .candidate-card:hover .candidate-card-inner,
763
+ .candidate-card:focus .candidate-card-inner,
764
+ .candidate-card:focus-within .candidate-card-inner {
765
+ transform: rotateY(180deg);
766
+ }
767
+
768
+ .candidate-face {
769
+ position: absolute;
770
+ inset: 0;
771
+ padding: 20px;
772
+ border-radius: 22px;
773
+ border: 1px solid var(--line);
774
+ background: #ffffff;
775
+ color: var(--text);
776
+ backface-visibility: hidden;
777
+ box-shadow: 0 12px 24px rgba(0,0,0,.06);
778
+ display: flex;
779
+ flex-direction: column;
780
+ gap: 14px;
781
+ }
782
+
783
+ .candidate-back {
784
+ transform: rotateY(180deg);
785
+ }
786
+
787
+ .paper-card,
788
+ .parse-card,
789
+ .journal-card {
790
+ border: 1px solid var(--line);
791
+ border-radius: 18px;
792
+ background: #ffffff;
793
+ }
794
+
795
+ footer {
796
+ display: none !important;
797
+ }
798
+
799
+ @media (max-width: 1180px) {
800
+ .model-switcher,
801
+ .candidate-grid {
802
+ grid-template-columns: 1fr;
803
+ }
804
+ }
805
+ """
806
+ CSS = BASE_CSS + "\n" + getdvnclayoutcss() + "\n" + getdiscoverycss()