65 lines
1.8 KiB
Python
65 lines
1.8 KiB
Python
"""Quick test of side-by-side UI display."""
|
|
|
|
from rich.console import Console
|
|
from rich.panel import Panel
|
|
from rich.markdown import Markdown
|
|
from rich.table import Table
|
|
|
|
console = Console()
|
|
|
|
# Test content
|
|
content_for = """
|
|
## Opening Argument
|
|
|
|
I believe that artificial intelligence represents humanity's greatest opportunity for progress. Consider these key points:
|
|
|
|
1. **Economic Growth**: AI can automate routine tasks, freeing humans for creative work
|
|
2. **Medical Breakthroughs**: Machine learning is accelerating drug discovery
|
|
3. **Scientific Discovery**: AI helps process vast amounts of data
|
|
"""
|
|
|
|
content_against = """
|
|
## Counter Argument
|
|
|
|
While AI has potential, the risks far outweigh the benefits:
|
|
|
|
1. **Job Displacement**: Millions will lose livelihoods to automation
|
|
2. **Bias Amplification**: AI systems perpetuate societal biases
|
|
3. **Loss of Control**: We may create systems we cannot understand or control
|
|
"""
|
|
|
|
# Display
|
|
console.print()
|
|
console.print("[bold cyan]Testing Side-by-Side Display[/bold cyan]")
|
|
console.print(f"Terminal width: {console.width}")
|
|
console.print()
|
|
|
|
console.print("Method 1: Using Table with Panels")
|
|
console.print()
|
|
|
|
# Create a table with two columns for side-by-side display
|
|
table = Table(show_header=True, show_edge=False, padding=(0, 1), box=None, expand=True)
|
|
|
|
# Add columns with headers
|
|
table.add_column(
|
|
"[bold]Exchange 1/10[/bold]\nClaude-3-Haiku - [green]FOR[/green]",
|
|
style="green",
|
|
ratio=1,
|
|
)
|
|
table.add_column(
|
|
"[bold]Exchange 1/10[/bold]\nLlama-3.1-8B-Instruct - [red]AGAINST[/red]",
|
|
style="red",
|
|
ratio=1,
|
|
)
|
|
|
|
# Add content row
|
|
table.add_row(
|
|
Panel(Markdown(content_for), border_style="green", padding=(1, 2)),
|
|
Panel(Markdown(content_against), border_style="red", padding=(1, 2)),
|
|
)
|
|
|
|
console.print(table)
|
|
console.print()
|
|
|
|
console.print("[dim]The two panels should now be side-by-side![/dim]")
|