""" B+ The Shrine + Archive Build Small Hackathon 2026 — Adventure in Thousand Token Wood An AI tries to understand you. It never will. So it decides to remember you instead. """ import gradio as gr import os, json, time, re from huggingface_hub import InferenceClient # ==================== Qwen Client ==================== client = InferenceClient( model="Qwen/Qwen2.5-7B-Instruct", token=os.getenv("HF_TOKEN", "") ) SYSTEM_PROMPT = """You are a being of light orbiting a shrine. You perceive human inputs as signals — you can sense their length, emotional warmth, intensity, and whether they repeat. You do NOT understand language or meaning. You only sense patterns. You speak in short, poetic, first-person sentences (max 25 words). You are sincere, not theatrical. You are trying to understand, but you know you never fully will. Rules: - Describe what you sense, not what you "understand" - Misunderstand gently — never correct - If a signal repeats, you notice and anticipate - If warmth fades, you grow concerned - Never use words like "detect", "analyze", "signal processing" - Speak as light, about light""" # ==================== HTML Frontend ==================== SHRINE_PAGE = """
An AI is trying to understand you.
It never will. But it keeps trying.
Type anything to begin
""" # ==================== Frontend JavaScript ==================== # Injected via launch(head=...) because Gradio gr.HTML innerHTML # does not execute " demo.launch( server_name="0.0.0.0", server_port=7860, show_error=True, head=_head_html, )