ArnabDeo commited on
Commit
3b81096
Β·
verified Β·
1 Parent(s): 6a4244d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +227 -76
app.py CHANGED
@@ -535,128 +535,274 @@ with gr.Blocks(
535
  </div>
536
  """)
537
 
538
- # Enhanced Disclaimer Section with Proper Text Visibility
539
  gr.HTML("""
540
  <div style="max-width: 900px; margin: 20px auto; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;">
 
541
  <!-- Main Disclaimer Box -->
542
- <div style="background: linear-gradient(135deg, #ff6b6b15, #feca5715);
543
- border: 3px solid #ff6b6b;
544
  border-radius: 15px;
545
- padding: 25px;
546
- margin-bottom: 20px;
547
- box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);">
548
- <div style="text-align: center; margin-bottom: 20px;">
549
- <h3 style="color: #000000; margin: 0; font-size: 1.8em; font-weight: bold; text-shadow: none;">
 
 
 
 
 
 
 
 
 
 
 
550
  ⚠️ IMPORTANT DISCLAIMER ⚠️
551
- </h3>
552
  </div>
553
 
554
  <div style="background: #ffffff;
555
- border-radius: 10px;
556
  padding: 25px;
557
  color: #000000;
558
  font-size: 16px;
559
- line-height: 1.7;
560
- border: 2px solid #e0e0e0;
561
- box-shadow: 0 4px 10px rgba(0,0,0,0.1);">
562
- <p style="margin: 0 0 20px 0; text-align: center; font-weight: bold; font-size: 18px; color: #000000;">
563
- πŸ“š <strong>FOR EDUCATIONAL PURPOSES ONLY</strong> πŸ“š
564
- </p>
565
- <ul style="list-style: none; padding: 0; margin: 0;">
566
- <li style="margin: 12px 0; padding: 15px; background: #f8f9fa; border-radius: 8px; border-left: 5px solid #3498db; color: #000000;">
567
- <strong style="color: #000000;">🚫 NOT FINANCIAL ADVICE:</strong> This AI tool is for learning and research only
568
- </li>
569
- <li style="margin: 12px 0; padding: 15px; background: #f8f9fa; border-radius: 8px; border-left: 5px solid #e74c3c; color: #000000;">
570
- <strong style="color: #000000;">⚑ AI CAN BE WRONG:</strong> Predictions may be inaccurate or completely wrong
571
- </li>
572
- <li style="margin: 12px 0; padding: 15px; background: #f8f9fa; border-radius: 8px; border-left: 5px solid #f39c12; color: #000000;">
573
- <strong style="color: #000000;">πŸ’Ό CONSULT PROFESSIONALS:</strong> Always seek qualified financial advisors
574
- </li>
575
- <li style="margin: 12px 0; padding: 15px; background: #f8f9fa; border-radius: 8px; border-left: 5px solid #9b59b6; color: #000000;">
576
- <strong style="color: #000000;">πŸ’° INVEST RESPONSIBLY:</strong> Only invest what you can afford to lose
577
- </li>
578
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  </div>
580
  </div>
581
 
582
  <!-- Trading Decision Guide for Beginners -->
583
- <div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin: 25px 0;">
584
 
585
  <!-- BUY Signal -->
586
- <div style="background: linear-gradient(135deg, #27ae60, #2ecc71);
587
  color: #ffffff;
588
  padding: 25px;
589
  border-radius: 15px;
590
  text-align: center;
591
- box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
592
- border: 3px solid #27ae60;">
593
  <div style="font-size: 3em; margin-bottom: 15px;">πŸ“ˆ</div>
594
- <h4 style="margin: 0 0 15px 0; font-size: 1.4em; font-weight: bold; color: #ffffff;">GREEN = BUY SIGNAL</h4>
595
- <p style="margin: 0; font-size: 15px; color: #ffffff; line-height: 1.4;">
 
 
 
 
 
 
 
 
 
596
  AI predicts price increase<br>
597
  <strong style="color: #ffffff;">⚠️ Still risky - do research!</strong>
598
  </p>
599
  </div>
600
 
601
  <!-- HOLD Signal -->
602
- <div style="background: linear-gradient(135deg, #f39c12, #e67e22);
603
  color: #ffffff;
604
  padding: 25px;
605
  border-radius: 15px;
606
  text-align: center;
607
- box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
608
- border: 3px solid #f39c12;">
609
  <div style="font-size: 3em; margin-bottom: 15px;">βšͺ</div>
610
- <h4 style="margin: 0 0 15px 0; font-size: 1.4em; font-weight: bold; color: #ffffff;">YELLOW = HOLD</h4>
611
- <p style="margin: 0; font-size: 15px; color: #ffffff; line-height: 1.4;">
 
 
 
 
 
 
 
 
 
612
  AI expects stable prices<br>
613
  <strong style="color: #ffffff;">Wait and watch strategy</strong>
614
  </p>
615
  </div>
616
 
617
  <!-- SELL Signal -->
618
- <div style="background: linear-gradient(135deg, #e74c3c, #c0392b);
619
  color: #ffffff;
620
  padding: 25px;
621
  border-radius: 15px;
622
  text-align: center;
623
- box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
624
- border: 3px solid #e74c3c;">
625
  <div style="font-size: 3em; margin-bottom: 15px;">πŸ“‰</div>
626
- <h4 style="margin: 0 0 15px 0; font-size: 1.4em; font-weight: bold; color: #ffffff;">RED = SELL SIGNAL</h4>
627
- <p style="margin: 0; font-size: 15px; color: #ffffff; line-height: 1.4;">
 
 
 
 
 
 
 
 
 
628
  AI predicts price decrease<br>
629
  <strong style="color: #ffffff;">Consider reducing exposure</strong>
630
  </p>
631
  </div>
632
  </div>
633
 
634
- <!-- Beginner Tips -->
635
- <div style="background: linear-gradient(135deg, #ffffff, #f8f9fa);
636
- border: 3px solid #3498db;
637
  border-radius: 15px;
638
- padding: 25px;
639
- margin-top: 25px;
640
- box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);">
641
- <h4 style="color: #000000; margin: 0 0 20px 0; text-align: center; font-size: 1.5em; font-weight: bold;">
642
- πŸ’‘ <strong>BEGINNER TIPS</strong> πŸ’‘
643
- </h4>
644
- <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px;">
645
- <div style="background: #ffffff; padding: 20px; border-radius: 10px; box-shadow: 0 3px 15px rgba(0,0,0,0.1); border: 2px solid #e0e0e0;">
646
- <strong style="color: #000000; font-size: 16px;">🎯 Start Small:</strong><br>
647
- <span style="color: #000000; font-size: 15px;">Begin with small amounts you can afford to lose completely</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
648
  </div>
649
- <div style="background: #ffffff; padding: 20px; border-radius: 10px; box-shadow: 0 3px 15px rgba(0,0,0,0.1); border: 2px solid #e0e0e0;">
650
- <strong style="color: #000000; font-size: 16px;">πŸ“š Keep Learning:</strong><br>
651
- <span style="color: #000000; font-size: 15px;">Study finance basics before making real investments</span>
 
 
 
 
 
 
 
 
 
 
652
  </div>
653
- <div style="background: #ffffff; padding: 20px; border-radius: 10px; box-shadow: 0 3px 15px rgba(0,0,0,0.1); border: 2px solid #e0e0e0;">
654
- <strong style="color: #000000; font-size: 16px;">🏦 Use Real Platforms:</strong><br>
655
- <span style="color: #000000; font-size: 15px;">Practice with paper trading before using real money</span>
 
 
 
 
 
 
 
 
 
 
656
  </div>
657
- <div style="background: #ffffff; padding: 20px; border-radius: 10px; box-shadow: 0 3px 15px rgba(0,0,0,0.1); border: 2px solid #e0e0e0;">
658
- <strong style="color: #000000; font-size: 16px;">⏰ Think Long-term:</strong><br>
659
- <span style="color: #000000; font-size: 15px;">Don't panic on daily market fluctuations</span>
 
 
 
 
 
 
 
 
 
 
660
  </div>
661
  </div>
662
  </div>
@@ -664,19 +810,24 @@ with gr.Blocks(
664
  <!-- Final Warning -->
665
  <div style="background: #2c3e50;
666
  color: #ffffff;
667
- padding: 20px;
668
- border-radius: 10px;
669
  text-align: center;
670
- margin-top: 25px;
671
- border: 3px solid #34495e;
672
- box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);">
673
- <p style="margin: 0; font-weight: bold; font-size: 17px; color: #ffffff;">
674
- 🚨 <strong>REMEMBER:</strong> Past performance β‰  Future results | Markets can crash | AI makes mistakes 🚨
675
- </p>
 
 
 
 
676
  </div>
677
  </div>
678
  """)
679
 
 
680
 
681
  with gr.Row():
682
  with gr.Column(scale=1, min_width=300):
 
535
  </div>
536
  """)
537
 
538
+ # Enhanced Disclaimer Section with Fully Visible Headings
539
  gr.HTML("""
540
  <div style="max-width: 900px; margin: 20px auto; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;">
541
+
542
  <!-- Main Disclaimer Box -->
543
+ <div style="background: #ffffff;
544
+ border: 5px solid #ff6b6b;
545
  border-radius: 15px;
546
+ padding: 30px;
547
+ margin-bottom: 30px;
548
+ box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);">
549
+
550
+ <!-- FIXED DISCLAIMER HEADING -->
551
+ <div style="background: #ff6b6b;
552
+ color: #ffffff;
553
+ text-align: center;
554
+ margin: -30px -30px 25px -30px;
555
+ padding: 25px;
556
+ border-radius: 10px 10px 0 0;">
557
+ <h2 style="color: #ffffff;
558
+ margin: 0;
559
+ font-size: 2.2em;
560
+ font-weight: bold;
561
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.3);">
562
  ⚠️ IMPORTANT DISCLAIMER ⚠️
563
+ </h2>
564
  </div>
565
 
566
  <div style="background: #ffffff;
567
+ border-radius: 12px;
568
  padding: 25px;
569
  color: #000000;
570
  font-size: 16px;
571
+ line-height: 1.8;">
572
+
573
+ <!-- Educational Purpose Header -->
574
+ <div style="background: #f8f9fa;
575
+ border: 3px solid #dee2e6;
576
+ border-radius: 10px;
577
+ padding: 20px;
578
+ text-align: center;
579
+ margin-bottom: 25px;">
580
+ <h3 style="margin: 0;
581
+ font-weight: bold;
582
+ font-size: 1.4em;
583
+ color: #000000;">
584
+ πŸ“š FOR EDUCATIONAL PURPOSES ONLY πŸ“š
585
+ </h3>
586
+ </div>
587
+
588
+ <!-- Disclaimer Points -->
589
+ <div style="display: grid; gap: 15px;">
590
+ <div style="background: #ffffff;
591
+ border: 3px solid #3498db;
592
+ border-radius: 10px;
593
+ padding: 20px;
594
+ box-shadow: 0 3px 10px rgba(0,0,0,0.1);">
595
+ <h4 style="color: #000000; margin: 0 0 8px 0; font-size: 1.1em;">
596
+ 🚫 NOT FINANCIAL ADVICE
597
+ </h4>
598
+ <p style="color: #000000; margin: 0; font-size: 15px;">
599
+ This AI tool is for learning and research only
600
+ </p>
601
+ </div>
602
+
603
+ <div style="background: #ffffff;
604
+ border: 3px solid #e74c3c;
605
+ border-radius: 10px;
606
+ padding: 20px;
607
+ box-shadow: 0 3px 10px rgba(0,0,0,0.1);">
608
+ <h4 style="color: #000000; margin: 0 0 8px 0; font-size: 1.1em;">
609
+ ⚑ AI CAN BE WRONG
610
+ </h4>
611
+ <p style="color: #000000; margin: 0; font-size: 15px;">
612
+ Predictions may be inaccurate or completely wrong
613
+ </p>
614
+ </div>
615
+
616
+ <div style="background: #ffffff;
617
+ border: 3px solid #f39c12;
618
+ border-radius: 10px;
619
+ padding: 20px;
620
+ box-shadow: 0 3px 10px rgba(0,0,0,0.1);">
621
+ <h4 style="color: #000000; margin: 0 0 8px 0; font-size: 1.1em;">
622
+ πŸ’Ό CONSULT PROFESSIONALS
623
+ </h4>
624
+ <p style="color: #000000; margin: 0; font-size: 15px;">
625
+ Always seek qualified financial advisors
626
+ </p>
627
+ </div>
628
+
629
+ <div style="background: #ffffff;
630
+ border: 3px solid #9b59b6;
631
+ border-radius: 10px;
632
+ padding: 20px;
633
+ box-shadow: 0 3px 10px rgba(0,0,0,0.1);">
634
+ <h4 style="color: #000000; margin: 0 0 8px 0; font-size: 1.1em;">
635
+ πŸ’° INVEST RESPONSIBLY
636
+ </h4>
637
+ <p style="color: #000000; margin: 0; font-size: 15px;">
638
+ Only invest what you can afford to lose
639
+ </p>
640
+ </div>
641
+ </div>
642
  </div>
643
  </div>
644
 
645
  <!-- Trading Decision Guide for Beginners -->
646
+ <div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 25px; margin: 30px 0;">
647
 
648
  <!-- BUY Signal -->
649
+ <div style="background: #27ae60;
650
  color: #ffffff;
651
  padding: 25px;
652
  border-radius: 15px;
653
  text-align: center;
654
+ box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
655
+ border: 4px solid #229954;">
656
  <div style="font-size: 3em; margin-bottom: 15px;">πŸ“ˆ</div>
657
+ <h3 style="margin: 0 0 15px 0;
658
+ font-size: 1.3em;
659
+ font-weight: bold;
660
+ color: #ffffff;
661
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.3);">
662
+ GREEN = BUY SIGNAL
663
+ </h3>
664
+ <p style="margin: 0;
665
+ font-size: 14px;
666
+ color: #ffffff;
667
+ line-height: 1.4;">
668
  AI predicts price increase<br>
669
  <strong style="color: #ffffff;">⚠️ Still risky - do research!</strong>
670
  </p>
671
  </div>
672
 
673
  <!-- HOLD Signal -->
674
+ <div style="background: #f39c12;
675
  color: #ffffff;
676
  padding: 25px;
677
  border-radius: 15px;
678
  text-align: center;
679
+ box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
680
+ border: 4px solid #e67e22;">
681
  <div style="font-size: 3em; margin-bottom: 15px;">βšͺ</div>
682
+ <h3 style="margin: 0 0 15px 0;
683
+ font-size: 1.3em;
684
+ font-weight: bold;
685
+ color: #ffffff;
686
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.3);">
687
+ YELLOW = HOLD
688
+ </h3>
689
+ <p style="margin: 0;
690
+ font-size: 14px;
691
+ color: #ffffff;
692
+ line-height: 1.4;">
693
  AI expects stable prices<br>
694
  <strong style="color: #ffffff;">Wait and watch strategy</strong>
695
  </p>
696
  </div>
697
 
698
  <!-- SELL Signal -->
699
+ <div style="background: #e74c3c;
700
  color: #ffffff;
701
  padding: 25px;
702
  border-radius: 15px;
703
  text-align: center;
704
+ box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
705
+ border: 4px solid #c0392b;">
706
  <div style="font-size: 3em; margin-bottom: 15px;">πŸ“‰</div>
707
+ <h3 style="margin: 0 0 15px 0;
708
+ font-size: 1.3em;
709
+ font-weight: bold;
710
+ color: #ffffff;
711
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.3);">
712
+ RED = SELL SIGNAL
713
+ </h3>
714
+ <p style="margin: 0;
715
+ font-size: 14px;
716
+ color: #ffffff;
717
+ line-height: 1.4;">
718
  AI predicts price decrease<br>
719
  <strong style="color: #ffffff;">Consider reducing exposure</strong>
720
  </p>
721
  </div>
722
  </div>
723
 
724
+ <!-- Beginner Tips - COMPLETELY FIXED VERSION -->
725
+ <div style="background: #ffffff;
726
+ border: 5px solid #3498db;
727
  border-radius: 15px;
728
+ padding: 30px;
729
+ margin-top: 30px;
730
+ box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);">
731
+
732
+ <!-- FIXED BEGINNER TIPS HEADING -->
733
+ <div style="background: #3498db;
734
+ color: #ffffff;
735
+ text-align: center;
736
+ margin: -30px -30px 25px -30px;
737
+ padding: 25px;
738
+ border-radius: 10px 10px 0 0;">
739
+ <h2 style="color: #ffffff;
740
+ margin: 0;
741
+ font-size: 2em;
742
+ font-weight: bold;
743
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.3);">
744
+ πŸ’‘ BEGINNER TIPS πŸ’‘
745
+ </h2>
746
+ </div>
747
+
748
+ <div style="display: grid;
749
+ grid-template-columns: 1fr 1fr;
750
+ gap: 25px;">
751
+ <div style="background: #ffffff;
752
+ padding: 25px;
753
+ border-radius: 12px;
754
+ box-shadow: 0 6px 20px rgba(0,0,0,0.15);
755
+ border: 4px solid #27ae60;">
756
+ <h4 style="color: #000000;
757
+ font-size: 1.2em;
758
+ margin: 0 0 12px 0;
759
+ font-weight: bold;">🎯 Start Small</h4>
760
+ <p style="color: #000000;
761
+ font-size: 15px;
762
+ margin: 0;
763
+ line-height: 1.5;">Begin with small amounts you can afford to lose completely</p>
764
  </div>
765
+ <div style="background: #ffffff;
766
+ padding: 25px;
767
+ border-radius: 12px;
768
+ box-shadow: 0 6px 20px rgba(0,0,0,0.15);
769
+ border: 4px solid #e74c3c;">
770
+ <h4 style="color: #000000;
771
+ font-size: 1.2em;
772
+ margin: 0 0 12px 0;
773
+ font-weight: bold;">πŸ“š Keep Learning</h4>
774
+ <p style="color: #000000;
775
+ font-size: 15px;
776
+ margin: 0;
777
+ line-height: 1.5;">Study finance basics before making real investments</p>
778
  </div>
779
+ <div style="background: #ffffff;
780
+ padding: 25px;
781
+ border-radius: 12px;
782
+ box-shadow: 0 6px 20px rgba(0,0,0,0.15);
783
+ border: 4px solid #f39c12;">
784
+ <h4 style="color: #000000;
785
+ font-size: 1.2em;
786
+ margin: 0 0 12px 0;
787
+ font-weight: bold;">🏦 Use Real Platforms</h4>
788
+ <p style="color: #000000;
789
+ font-size: 15px;
790
+ margin: 0;
791
+ line-height: 1.5;">Practice with paper trading before using real money</p>
792
  </div>
793
+ <div style="background: #ffffff;
794
+ padding: 25px;
795
+ border-radius: 12px;
796
+ box-shadow: 0 6px 20px rgba(0,0,0,0.15);
797
+ border: 4px solid #9b59b6;">
798
+ <h4 style="color: #000000;
799
+ font-size: 1.2em;
800
+ margin: 0 0 12px 0;
801
+ font-weight: bold;">⏰ Think Long-term</h4>
802
+ <p style="color: #000000;
803
+ font-size: 15px;
804
+ margin: 0;
805
+ line-height: 1.5;">Don't panic on daily market fluctuations</p>
806
  </div>
807
  </div>
808
  </div>
 
810
  <!-- Final Warning -->
811
  <div style="background: #2c3e50;
812
  color: #ffffff;
813
+ padding: 25px;
814
+ border-radius: 12px;
815
  text-align: center;
816
+ margin-top: 30px;
817
+ border: 4px solid #34495e;
818
+ box-shadow: 0 8px 25px rgba(44, 62, 80, 0.4);">
819
+ <h3 style="margin: 0;
820
+ font-weight: bold;
821
+ font-size: 1.1em;
822
+ color: #ffffff;
823
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.5);">
824
+ 🚨 REMEMBER: Past performance β‰  Future results | Markets can crash | AI makes mistakes 🚨
825
+ </h3>
826
  </div>
827
  </div>
828
  """)
829
 
830
+
831
 
832
  with gr.Row():
833
  with gr.Column(scale=1, min_width=300):