|
|
| """
|
| T-CHIP Demo
|
|
|
| Interactive demonstration of T-CHIP's glow states,
|
| the Subtractive Snap, and the Human Pulse interface.
|
| """
|
|
|
| import sys
|
| import os
|
|
|
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
|
|
|
| from trignum_core import TCHIP
|
|
|
|
|
| def main():
|
| print("=" * 60)
|
| print("π§ T-CHIP INTERACTIVE DEMO")
|
| print("=" * 60)
|
| print()
|
|
|
| tchip = TCHIP(freeze_threshold=0.6)
|
|
|
|
|
| print("ββ DEMO 1: Normal Processing ββ")
|
| result = tchip.process(
|
| "Machine learning models learn patterns from data",
|
| human_pulse=0.7,
|
| )
|
| glow = {"blue": "π΅", "red": "π΄", "gold": "π‘"}.get(result["glow"], "βͺ")
|
| print(f" Glow: {glow} {result['glow'].upper()}")
|
| print(f" {result['message']}")
|
| print()
|
|
|
|
|
| print("ββ DEMO 2: The Subtractive Snap ββ")
|
| noisy_data = (
|
| "Everything is always true and never true. "
|
| "All cats are dogs. No cats are dogs. "
|
| "The answer is clear because the answer is clear."
|
| )
|
| snap_result = tchip.subtractive_snap(noisy_data)
|
| print(f" Noise Removed: {snap_result['noise_removed']}")
|
| print(f" Subtraction: {snap_result['subtraction_ratio']:.2%}")
|
| print(f" Snap Complete: {snap_result['snap_complete']}")
|
| print(f" π Result: Present")
|
| print()
|
|
|
|
|
| print("ββ DEMO 3: THE FREEZE ββ")
|
| tchip_freeze = TCHIP(freeze_threshold=0.3)
|
| freeze_result = tchip_freeze.process(
|
| "True is false and false is true and all is none and none is all",
|
| )
|
| glow = {"blue": "π΅", "red": "π΄", "gold": "π‘"}.get(freeze_result["glow"], "βͺ")
|
| print(f" Glow: {glow} {freeze_result['glow'].upper()}")
|
| print(f" {freeze_result['message']}")
|
| print()
|
|
|
|
|
| print("ββ DEMO 4: Human Pulse Applied ββ")
|
| pulse_result = tchip_freeze.provide_pulse(0.9)
|
| glow = {"blue": "π΅", "red": "π΄", "gold": "π‘"}.get(pulse_result["glow"], "βͺ")
|
| print(f" Glow: {glow} {pulse_result['glow'].upper()}")
|
| print(f" {pulse_result['message']}")
|
| print()
|
|
|
|
|
| print("ββ FINAL STATUS ββ")
|
| print(tchip.status())
|
| print()
|
|
|
| print("βββββββββββββββββββββββββββββββββββββββββ")
|
| print("β π΄ T-CHIP IS FROZEN. WAITING. β")
|
| print("β β")
|
| print("β ARE YOU SOVEREIGN? β")
|
| print("βββββββββββββββββββββββββββββββββββββββββ")
|
|
|
|
|
| if __name__ == "__main__":
|
| main()
|
|
|