Pratik Bhavsar commited on
Commit
83e2d7b
Β·
1 Parent(s): 69c6c68

improved layout

Browse files
components/prediction_components.py CHANGED
@@ -299,14 +299,14 @@ def create_ac_prediction_chart(df, domain_filter="All", model_type_filter="All")
299
  '<b style="color: #28a745;">Cost Efficiency:</b><br>'
300
  'β€’ <b>Avg Session Cost:</b> $%{customdata[4]:.4f}<br>'
301
  '<br>'
302
- '<i style="color: #B1B5B9; font-size: 11px;">Performance at release time</i>'
303
  '<extra></extra>'
304
  ),
305
  text=df_clean['Model'].values,
306
  hoverlabel=dict(
307
  bgcolor='rgba(26, 26, 46, 0.95)',
308
  bordercolor='rgba(227, 84, 84, 0.5)',
309
- font=dict(size=12, color='#F5F6F7', family='Geist, sans-serif'),
310
  align='left',
311
  namelength=-1
312
  )
@@ -349,7 +349,7 @@ def create_ac_prediction_chart(df, domain_filter="All", model_type_filter="All")
349
  best_model_at_date
350
  )),
351
  hovertemplate=(
352
- '<b style="font-size: 16px; color: #E35454;">πŸ“ˆ Best Performance Frontier</b><br>'
353
  '<br>'
354
  '<b>Date:</b> %{x|%B %Y}<br>'
355
  '<b>Leading Model:</b> %{customdata[3]}<br>'
@@ -360,13 +360,13 @@ def create_ac_prediction_chart(df, domain_filter="All", model_type_filter="All")
360
  'β€’ Growth Rate: <span style="color: #28a745;">+%{customdata[1]:.1f}%</span><br>'
361
  'β€’ Gap to 99%: <span style="color: #1098F7;">%{customdata[2]:.1%}</span><br>'
362
  '<br>'
363
- '<i style="color: #B1B5B9;">This represents the best performance achieved by any model up to this date</i>'
364
  '<extra></extra>'
365
  ),
366
  hoverlabel=dict(
367
  bgcolor='rgba(26, 26, 46, 0.95)',
368
  bordercolor='rgba(227, 84, 84, 0.5)',
369
- font=dict(size=12, color='#F5F6F7', family='Geist, sans-serif'),
370
  align='left',
371
  namelength=-1
372
  )
@@ -406,13 +406,13 @@ def create_ac_prediction_chart(df, domain_filter="All", model_type_filter="All")
406
  f'β€’ <b>Algorithm:</b> {best_model.capitalize()}<br>'
407
  'β€’ <b>RΒ² Score:</b> %{customdata[3]:.3f}<br>'
408
  '<br>'
409
- '<i style="color: #B1B5B9; font-size: 11px;">Based on historical performance trends</i>'
410
  '<extra></extra>'
411
  ),
412
  hoverlabel=dict(
413
  bgcolor='rgba(26, 26, 46, 0.95)',
414
  bordercolor='rgba(16, 152, 247, 0.5)',
415
- font=dict(size=12, color='#F5F6F7', family='Geist, sans-serif'),
416
  align='left',
417
  namelength=-1
418
  )
@@ -471,7 +471,7 @@ def create_ac_prediction_chart(df, domain_filter="All", model_type_filter="All")
471
  hoverlabel=dict(
472
  bgcolor='rgba(26, 26, 46, 0.95)',
473
  bordercolor='rgba(40, 167, 69, 0.5)',
474
- font=dict(size=12, color='#F5F6F7', family='Geist, sans-serif'),
475
  align='left',
476
  namelength=-1
477
  )
@@ -589,4 +589,7 @@ def create_ac_prediction_chart(df, domain_filter="All", model_type_filter="All")
589
  )
590
 
591
 
592
- return fig, date_99, months_from_now
 
 
 
 
299
  '<b style="color: #28a745;">Cost Efficiency:</b><br>'
300
  'β€’ <b>Avg Session Cost:</b> $%{customdata[4]:.4f}<br>'
301
  '<br>'
302
+ '<i style="color: #B1B5B9; font-size: 13px;">Performance at release time</i>'
303
  '<extra></extra>'
304
  ),
305
  text=df_clean['Model'].values,
306
  hoverlabel=dict(
307
  bgcolor='rgba(26, 26, 46, 0.95)',
308
  bordercolor='rgba(227, 84, 84, 0.5)',
309
+ font=dict(size=14, color='#F5F6F7', family='Geist, sans-serif'),
310
  align='left',
311
  namelength=-1
312
  )
 
349
  best_model_at_date
350
  )),
351
  hovertemplate=(
352
+ '<b style="font-size: 20px; color: #E35454;">πŸ“ˆ Best Performance Frontier</b><br>'
353
  '<br>'
354
  '<b>Date:</b> %{x|%B %Y}<br>'
355
  '<b>Leading Model:</b> %{customdata[3]}<br>'
 
360
  'β€’ Growth Rate: <span style="color: #28a745;">+%{customdata[1]:.1f}%</span><br>'
361
  'β€’ Gap to 99%: <span style="color: #1098F7;">%{customdata[2]:.1%}</span><br>'
362
  '<br>'
363
+ '<i style="color: #B1B5B9; font-size: 13px;">This represents the best performance achieved by any model up to this date</i>'
364
  '<extra></extra>'
365
  ),
366
  hoverlabel=dict(
367
  bgcolor='rgba(26, 26, 46, 0.95)',
368
  bordercolor='rgba(227, 84, 84, 0.5)',
369
+ font=dict(size=14, color='#F5F6F7', family='Geist, sans-serif'),
370
  align='left',
371
  namelength=-1
372
  )
 
406
  f'β€’ <b>Algorithm:</b> {best_model.capitalize()}<br>'
407
  'β€’ <b>RΒ² Score:</b> %{customdata[3]:.3f}<br>'
408
  '<br>'
409
+ '<i style="color: #B1B5B9; font-size: 13px;">Based on historical performance trends</i>'
410
  '<extra></extra>'
411
  ),
412
  hoverlabel=dict(
413
  bgcolor='rgba(26, 26, 46, 0.95)',
414
  bordercolor='rgba(16, 152, 247, 0.5)',
415
+ font=dict(size=14, color='#F5F6F7', family='Geist, sans-serif'),
416
  align='left',
417
  namelength=-1
418
  )
 
471
  hoverlabel=dict(
472
  bgcolor='rgba(26, 26, 46, 0.95)',
473
  bordercolor='rgba(40, 167, 69, 0.5)',
474
+ font=dict(size=14, color='#F5F6F7', family='Geist, sans-serif'),
475
  align='left',
476
  namelength=-1
477
  )
 
589
  )
590
 
591
 
592
+ # Get the current best AC value (last value in y_data)
593
+ current_best_ac = y_data[-1] if len(y_data) > 0 else None
594
+
595
+ return fig, date_99, months_from_now, current_best_ac
tabs/leaderboard_v2.py CHANGED
@@ -1655,24 +1655,14 @@ def create_leaderboard_v2_tab():
1655
  </p>
1656
  """)
1657
 
1658
- # Add prediction chart - make it reactive
1659
- gr.HTML('<div class="chart-container">')
1660
-
1661
  # Create initial prediction with default filters
1662
- initial_prediction_chart, initial_date_99, initial_months_to_99 = create_ac_prediction_chart(
1663
  load_leaderboard_data(), domain_filter="All", model_type_filter="All"
1664
  )
1665
 
1666
- prediction_plot = gr.Plot(
1667
- label="",
1668
- value=initial_prediction_chart,
1669
- elem_classes=["prediction-chart", "plot-container"]
1670
- )
1671
- gr.HTML('</div>')
1672
-
1673
- # Add dynamic insights section
1674
- def generate_insight_html(date_99, months_to_99, domain_filter="All", model_type_filter="All"):
1675
- """Generate insight HTML based on prediction results and filters"""
1676
  # Clean up filter names
1677
  if domain_filter.startswith('🌐'):
1678
  domain_clean = "All Domains"
@@ -1690,60 +1680,310 @@ def create_leaderboard_v2_tab():
1690
  domain_clean = domain_filter
1691
 
1692
  filter_context = ""
 
1693
  if domain_clean != "All Domains" or model_type_filter != "All":
1694
- filter_context = " for "
1695
  if domain_clean != "All Domains":
1696
- filter_context += f"<strong>{domain_clean}</strong>"
1697
  if model_type_filter != "All":
1698
- if domain_clean != "All Domains":
1699
- filter_context += f" ({model_type_filter} models)"
1700
- else:
1701
- filter_context += f"<strong>{model_type_filter} models</strong>"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1702
 
1703
  if date_99 and months_to_99:
1704
  if months_to_99 > 0:
 
 
 
 
 
 
 
 
1705
  return f"""
1706
- <div style="margin-top: 20px; padding: 16px; background: linear-gradient(145deg, rgba(16, 152, 247, 0.1) 0%, rgba(227, 84, 84, 0.05) 100%); border: 1px solid var(--border-subtle); border-radius: 12px;">
1707
- <div style="display: flex; align-items: center; gap: 12px; margin-bottom: 12px;">
1708
- <span style="font-size: 1.5rem;">🎯</span>
1709
- <span style="font-weight: 700; color: var(--text-primary); font-size: 1.1rem;">Key Prediction Insights{filter_context}</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1710
  </div>
1711
- <ul style="color: var(--text-secondary); margin: 0; padding-left: 20px; line-height: 1.8;">
1712
- <li><strong style="color: var(--accent-primary);">Enterprise threshold (99% AC)</strong> predicted by <strong style="color: var(--accent-secondary);">{date_99.strftime('%B %Y')}</strong></li>
1713
- <li>Approximately <strong style="color: var(--accent-primary);">{months_to_99:.0f} months</strong> from current date</li>
1714
- <li>Performance trends based on <strong>historical data{filter_context}</strong></li>
1715
- <li>Early adopters who invest now gain <strong>{months_to_99:.0f} months</strong> of competitive advantage</li>
1716
- </ul>
1717
  </div>
1718
  """
1719
  else:
1720
  return f"""
1721
- <div style="margin-top: 20px; padding: 16px; background: linear-gradient(145deg, rgba(40, 167, 69, 0.1) 0%, rgba(227, 84, 84, 0.05) 100%); border: 1px solid var(--border-subtle); border-radius: 12px;">
1722
- <div style="display: flex; align-items: center; gap: 12px; margin-bottom: 12px;">
1723
- <span style="font-size: 1.5rem;">βœ…</span>
1724
- <span style="font-weight: 700; color: var(--text-primary); font-size: 1.1rem;">Enterprise Ready{filter_context}!</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1725
  </div>
1726
- <ul style="color: var(--text-secondary); margin: 0; padding-left: 20px; line-height: 1.8;">
1727
- <li>Models{filter_context} have <strong style="color: #28a745;">already achieved</strong> near-enterprise reliability</li>
1728
- <li>Focus should shift to <strong>implementation and scaling</strong></li>
1729
- <li>Investment in guardrails and observability is <strong>critical now</strong></li>
1730
- </ul>
1731
  </div>
1732
  """
1733
  else:
1734
  return f"""
1735
- <div style="margin-top: 20px; padding: 16px; background: rgba(245, 246, 247, 0.03); border: 1px solid var(--border-subtle); border-radius: 12px;">
1736
- <p style="color: var(--text-secondary); margin: 0;">
1737
- {'Insufficient data' + filter_context + ' to make reliable predictions. More models need to be evaluated in this category.' if (domain_clean != "All Domains" or model_type_filter != "All") else 'Based on current data trends, we are tracking the exponential improvement in AI agent capabilities. As more models are released, our predictions will become more accurate.'}
1738
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1739
  </div>
1740
  """
1741
 
1742
- # Create the insights HTML component
1743
  prediction_insights = gr.HTML(
1744
- generate_insight_html(initial_date_99, initial_months_to_99, "All", "All")
 
 
 
 
 
 
 
 
 
1745
  )
1746
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1747
  gr.HTML("</div>")
1748
 
1749
  # Radar Chart Section
@@ -1959,12 +2199,12 @@ def create_leaderboard_v2_tab():
1959
  df = load_leaderboard_data()
1960
 
1961
  # Create new prediction chart with filters
1962
- chart, date_99, months_to_99 = create_ac_prediction_chart(
1963
  df, domain_filter=domain_filter, model_type_filter=model_type_filter
1964
  )
1965
 
1966
- # Generate new insights HTML
1967
- insights_html = generate_insight_html(date_99, months_to_99, domain_filter, model_type_filter)
1968
 
1969
  return chart, insights_html
1970
 
 
1655
  </p>
1656
  """)
1657
 
 
 
 
1658
  # Create initial prediction with default filters
1659
+ initial_prediction_chart, initial_date_99, initial_months_to_99, initial_best_ac = create_ac_prediction_chart(
1660
  load_leaderboard_data(), domain_filter="All", model_type_filter="All"
1661
  )
1662
 
1663
+ # Add dynamic insights section with visual cards
1664
+ def generate_insight_html(date_99, months_to_99, domain_filter="All", model_type_filter="All", current_best_ac=None):
1665
+ """Generate insight HTML with visual cards/badges based on prediction results and filters"""
 
 
 
 
 
 
 
1666
  # Clean up filter names
1667
  if domain_filter.startswith('🌐'):
1668
  domain_clean = "All Domains"
 
1680
  domain_clean = domain_filter
1681
 
1682
  filter_context = ""
1683
+ filter_badge = ""
1684
  if domain_clean != "All Domains" or model_type_filter != "All":
1685
+ parts = []
1686
  if domain_clean != "All Domains":
1687
+ parts.append(domain_clean)
1688
  if model_type_filter != "All":
1689
+ parts.append(f"{model_type_filter} Models")
1690
+ filter_badge = f"""
1691
+ <span style="
1692
+ display: inline-flex;
1693
+ align-items: center;
1694
+ gap: 4px;
1695
+ padding: 4px 10px;
1696
+ background: rgba(16, 152, 247, 0.15);
1697
+ border: 1px solid rgba(16, 152, 247, 0.3);
1698
+ border-radius: 20px;
1699
+ font-size: 0.85rem;
1700
+ font-weight: 600;
1701
+ color: var(--accent-primary);
1702
+ margin-left: 12px;
1703
+ ">
1704
+ <span style="font-size: 0.9rem;">πŸ”</span>
1705
+ {' β€’ '.join(parts)}
1706
+ </span>
1707
+ """
1708
 
1709
  if date_99 and months_to_99:
1710
  if months_to_99 > 0:
1711
+ # Calculate percentage progress (assuming 100% at 99% AC)
1712
+ # If current_best_ac is provided, use it; otherwise default to 85%
1713
+ if current_best_ac is not None:
1714
+ # Scale from 0-99% AC to 0-100% progress
1715
+ current_progress = min(100, int((current_best_ac / 0.99) * 100))
1716
+ else:
1717
+ current_progress = 85 # Fallback if not provided
1718
+
1719
  return f"""
1720
+ <div style="margin-bottom: 24px;">
1721
+ <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 16px;">
1722
+ <h3 style="margin: 0; color: var(--text-primary); font-size: 1.3rem; font-weight: 700;">
1723
+ Key Predictions
1724
+ </h3>
1725
+ {filter_badge}
1726
+ </div>
1727
+
1728
+ <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;">
1729
+ <!-- Enterprise Ready Date Card -->
1730
+ <div style="
1731
+ padding: 20px;
1732
+ background: linear-gradient(135deg, rgba(16, 152, 247, 0.1) 0%, rgba(16, 152, 247, 0.05) 100%);
1733
+ border: 1px solid rgba(16, 152, 247, 0.2);
1734
+ border-radius: 16px;
1735
+ position: relative;
1736
+ overflow: hidden;
1737
+ ">
1738
+ <div style="
1739
+ position: absolute;
1740
+ top: -20px;
1741
+ right: -20px;
1742
+ width: 60px;
1743
+ height: 60px;
1744
+ background: radial-gradient(circle, rgba(16, 152, 247, 0.2) 0%, transparent 70%);
1745
+ border-radius: 50%;
1746
+ "></div>
1747
+ <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px;">
1748
+ <span style="font-size: 1.8rem;">πŸ“…</span>
1749
+ <span style="color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;">Target Date</span>
1750
+ </div>
1751
+ <div style="font-size: 1.8rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px;">
1752
+ {date_99.strftime('%b %Y')}
1753
+ </div>
1754
+ <div style="color: var(--text-secondary); font-size: 0.95rem;">
1755
+ 99% AC Threshold
1756
+ </div>
1757
+ </div>
1758
+
1759
+ <!-- Time Remaining Card -->
1760
+ <div style="
1761
+ padding: 20px;
1762
+ background: linear-gradient(135deg, rgba(227, 84, 84, 0.1) 0%, rgba(227, 84, 84, 0.05) 100%);
1763
+ border: 1px solid rgba(227, 84, 84, 0.2);
1764
+ border-radius: 16px;
1765
+ position: relative;
1766
+ overflow: hidden;
1767
+ ">
1768
+ <div style="
1769
+ position: absolute;
1770
+ top: -20px;
1771
+ right: -20px;
1772
+ width: 60px;
1773
+ height: 60px;
1774
+ background: radial-gradient(circle, rgba(227, 84, 84, 0.2) 0%, transparent 70%);
1775
+ border-radius: 50%;
1776
+ "></div>
1777
+ <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px;">
1778
+ <span style="font-size: 1.8rem;">⏱️</span>
1779
+ <span style="color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;">Timeline</span>
1780
+ </div>
1781
+ <div style="font-size: 1.8rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px;">
1782
+ ~{months_to_99:.0f}
1783
+ </div>
1784
+ <div style="color: var(--text-secondary); font-size: 0.95rem;">
1785
+ Months to 99% AC
1786
+ </div>
1787
+ </div>
1788
+
1789
+ <!-- Current Performance Card -->
1790
+ <div style="
1791
+ padding: 20px;
1792
+ background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
1793
+ border: 1px solid rgba(40, 167, 69, 0.2);
1794
+ border-radius: 16px;
1795
+ position: relative;
1796
+ overflow: hidden;
1797
+ ">
1798
+ <div style="
1799
+ position: absolute;
1800
+ top: -20px;
1801
+ right: -20px;
1802
+ width: 60px;
1803
+ height: 60px;
1804
+ background: radial-gradient(circle, rgba(40, 167, 69, 0.2) 0%, transparent 70%);
1805
+ border-radius: 50%;
1806
+ "></div>
1807
+ <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px;">
1808
+ <span style="font-size: 1.8rem;">πŸ“ˆ</span>
1809
+ <span style="color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;">Current Best</span>
1810
+ </div>
1811
+ <div style="font-size: 1.8rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px;">
1812
+ {current_best_ac*100:.0f}%
1813
+ </div>
1814
+ <div style="color: var(--text-secondary); font-size: 0.95rem;">
1815
+ AC Score Achieved
1816
+ </div>
1817
+ </div>
1818
+ </div>
1819
+
1820
+ <!-- Progress Bar -->
1821
+ <div style="margin-top: 20px; padding: 16px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border-subtle); border-radius: 12px;">
1822
+ <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">
1823
+ <span style="color: var(--text-secondary); font-size: 0.9rem; font-weight: 600;">PROGRESS TO ENTERPRISE READY</span>
1824
+ <span style="color: var(--accent-primary); font-size: 0.9rem; font-weight: 700;">{current_progress}%</span>
1825
+ </div>
1826
+ <div style="width: 100%; height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden;">
1827
+ <div style="width: {current_progress}%; height: 100%; background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%); border-radius: 4px; transition: width 0.3s ease;"></div>
1828
+ </div>
1829
  </div>
 
 
 
 
 
 
1830
  </div>
1831
  """
1832
  else:
1833
  return f"""
1834
+ <div style="margin-bottom: 24px;">
1835
+ <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 16px;">
1836
+ <h3 style="margin: 0; color: var(--text-primary); font-size: 1.3rem; font-weight: 700;">
1837
+ Achievement Status
1838
+ </h3>
1839
+ {filter_badge}
1840
+ </div>
1841
+
1842
+ <div style="
1843
+ padding: 24px;
1844
+ background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(40, 167, 69, 0.05) 100%);
1845
+ border: 2px solid rgba(40, 167, 69, 0.3);
1846
+ border-radius: 16px;
1847
+ text-align: center;
1848
+ ">
1849
+ <span style="font-size: 3rem; margin-bottom: 12px; display: block;">πŸŽ‰</span>
1850
+ <h2 style="margin: 0 0 12px 0; color: var(--text-primary); font-size: 1.8rem; font-weight: 800;">
1851
+ Enterprise Ready!
1852
+ </h2>
1853
+ <p style="color: var(--text-secondary); font-size: 1.1rem; margin: 0 0 20px 0;">
1854
+ Models have achieved enterprise-grade reliability
1855
+ </p>
1856
+
1857
+ <div style="display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;">
1858
+ <span style="
1859
+ display: inline-flex;
1860
+ align-items: center;
1861
+ gap: 6px;
1862
+ padding: 8px 16px;
1863
+ background: rgba(40, 167, 69, 0.1);
1864
+ border: 1px solid rgba(40, 167, 69, 0.3);
1865
+ border-radius: 24px;
1866
+ font-size: 0.95rem;
1867
+ font-weight: 600;
1868
+ color: #28a745;
1869
+ ">
1870
+ βœ“ 99% AC Achieved
1871
+ </span>
1872
+ <span style="
1873
+ display: inline-flex;
1874
+ align-items: center;
1875
+ gap: 6px;
1876
+ padding: 8px 16px;
1877
+ background: rgba(16, 152, 247, 0.1);
1878
+ border: 1px solid rgba(16, 152, 247, 0.3);
1879
+ border-radius: 24px;
1880
+ font-size: 0.95rem;
1881
+ font-weight: 600;
1882
+ color: var(--accent-primary);
1883
+ ">
1884
+ ⚑ Ready for Scaling
1885
+ </span>
1886
+ <span style="
1887
+ display: inline-flex;
1888
+ align-items: center;
1889
+ gap: 6px;
1890
+ padding: 8px 16px;
1891
+ background: rgba(227, 84, 84, 0.1);
1892
+ border: 1px solid rgba(227, 84, 84, 0.3);
1893
+ border-radius: 24px;
1894
+ font-size: 0.95rem;
1895
+ font-weight: 600;
1896
+ color: var(--accent-secondary);
1897
+ ">
1898
+ πŸ›‘οΈ Focus on Guardrails
1899
+ </span>
1900
+ </div>
1901
  </div>
 
 
 
 
 
1902
  </div>
1903
  """
1904
  else:
1905
  return f"""
1906
+ <div style="margin-bottom: 24px;">
1907
+ <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 16px;">
1908
+ <h3 style="margin: 0; color: var(--text-primary); font-size: 1.3rem; font-weight: 700;">
1909
+ Prediction Status
1910
+ </h3>
1911
+ {filter_badge}
1912
+ </div>
1913
+
1914
+ <div style="
1915
+ padding: 20px;
1916
+ background: rgba(255, 193, 7, 0.08);
1917
+ border: 1px solid rgba(255, 193, 7, 0.2);
1918
+ border-radius: 16px;
1919
+ display: flex;
1920
+ align-items: center;
1921
+ gap: 16px;
1922
+ ">
1923
+ <span style="font-size: 2.5rem;">πŸ“Š</span>
1924
+ <div>
1925
+ <h4 style="margin: 0 0 8px 0; color: var(--text-primary); font-size: 1.1rem; font-weight: 700;">
1926
+ Insufficient Data for Predictions
1927
+ </h4>
1928
+ <p style="color: var(--text-secondary); margin: 0; font-size: 0.95rem; line-height: 1.5;">
1929
+ {'More models need to be evaluated in this category to generate reliable predictions.' if (domain_clean != "All Domains" or model_type_filter != "All") else 'As more models are released and evaluated, our predictions will become more accurate.'}
1930
+ </p>
1931
+ </div>
1932
+ </div>
1933
  </div>
1934
  """
1935
 
1936
+ # Create the insights HTML component ABOVE the chart
1937
  prediction_insights = gr.HTML(
1938
+ generate_insight_html(initial_date_99, initial_months_to_99, "All", "All", initial_best_ac)
1939
+ )
1940
+
1941
+ # Add prediction chart - make it reactive
1942
+ gr.HTML('<div class="chart-container">')
1943
+
1944
+ prediction_plot = gr.Plot(
1945
+ label="",
1946
+ value=initial_prediction_chart,
1947
+ elem_classes=["prediction-chart", "plot-container"]
1948
  )
1949
 
1950
+ gr.HTML('</div>')
1951
+
1952
+ # Add methodology note
1953
+ gr.HTML("""
1954
+ <div style="
1955
+ margin-top: 20px;
1956
+ margin-bottom: 24px;
1957
+ padding: 16px;
1958
+ background: rgba(16, 152, 247, 0.05);
1959
+ border-left: 3px solid var(--accent-primary);
1960
+ border-radius: 8px;
1961
+ ">
1962
+ <div style="display: flex; align-items: flex-start; gap: 12px;">
1963
+ <span style="font-size: 1.2rem; color: var(--accent-primary); margin-top: 2px;">πŸ“Š</span>
1964
+ <div>
1965
+ <h4 style="margin: 0 0 8px 0; color: var(--text-primary); font-size: 1rem; font-weight: 600;">
1966
+ Methodology Note
1967
+ </h4>
1968
+ <p style="color: var(--text-secondary); margin: 0; font-size: 0.95rem; line-height: 1.6;">
1969
+ Our current prediction uses a <strong>conservative linear projection with a 50% diminishing returns factor</strong>.
1970
+ This simple approach assumes that future AI improvements will occur at half the current rate, accounting for
1971
+ increasing technical challenges as models approach higher performance levels.
1972
+ </p>
1973
+ <p style="color: var(--text-secondary); margin: 8px 0 0 0; font-size: 0.95rem; line-height: 1.6;">
1974
+ <strong>Why this approach?</strong> With limited data points currently available, complex curve fitting
1975
+ (exponential, logistic) would lead to overfitting. As we evaluate more models and gather additional data points,
1976
+ we will refine our methodology to incorporate more sophisticated growth models that better capture the true
1977
+ trajectory of AI agent capabilities.
1978
+ </p>
1979
+ <p style="color: var(--accent-primary); margin: 8px 0 0 0; font-size: 0.9rem; font-weight: 600;">
1980
+ πŸ”„ This projection will automatically update as new models are added to the leaderboard.
1981
+ </p>
1982
+ </div>
1983
+ </div>
1984
+ </div>
1985
+ """)
1986
+
1987
  gr.HTML("</div>")
1988
 
1989
  # Radar Chart Section
 
2199
  df = load_leaderboard_data()
2200
 
2201
  # Create new prediction chart with filters
2202
+ chart, date_99, months_to_99, current_best_ac = create_ac_prediction_chart(
2203
  df, domain_filter=domain_filter, model_type_filter=model_type_filter
2204
  )
2205
 
2206
+ # Generate new insights HTML with current best AC for progress bar
2207
+ insights_html = generate_insight_html(date_99, months_to_99, domain_filter, model_type_filter, current_best_ac)
2208
 
2209
  return chart, insights_html
2210