Lara Monteagudo Tubau commited on
Commit Β·
e2acfe7
1
Parent(s): de4e37c
home: hide agreement/library cards, add 6-step about section
Browse files2932 unmodified lines293329342935293629372938293929401 unmodified line29422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872932 unmodified lines# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ# PAGE 0: Welcome# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββwith gr.Column(visible=True) as pg_welcome:gr.HTML('<div class="cc-hero">''<h1 class="cc-hero-title">CollabCode</h1>'1 unmodified line'for collaborative learning research</p>''</div>')with gr.Row(equal_height=True):with gr.Column(scale=2):gr.HTML('<div class="cc-entry-card">''<span class="cc-entry-kicker">Primary workflow</span>''<h3 class="cc-entry-title">Code a Transcript</h3>''<p class="cc-entry-desc">Choose a Zoom transcript from Drive, let AI detect ''sections and episode boundaries, then code each segment ''against the D1βD9 collaborative learning dimensions.</p>''</div>')start_btn = gr.Button("Start Coding β", variant="primary", size="lg")with gr.Column(scale=1):gr.HTML('<div class="cc-entry-card">''<span class="cc-entry-kicker">After coding</span>''<h3 class="cc-entry-title">Check Agreement</h3>''<p class="cc-entry-desc">Upload both coders\' files, ''compute Gwet\'s AC1 and Cohen\'s ΞΊ, resolve disagreements.</p>''</div>')agreement_nav_btn = gr.Button("Open Agreement β")with gr.Column(scale=1):gr.HTML('<div class="cc-entry-card">''<span class="cc-entry-kicker">Advanced</span>''<h3 class="cc-entry-title">Review AI Rules</h3>''<p class="cc-entry-desc">Approve or reject Agent 2\'s proposed ''coding rules before they enter the validated library.</p>''</div>')library_nav_btn = gr.Button("Open Library β")gr.HTML('<div style="text-align:center;padding:32px 0 16px;font-size:0.75rem;color:#94a3b8">'f'Model: <strong>{MODEL_ID.split("/")[-1]}</strong> Β· 'f'Temperature: {TEMPERATURE} Β· ''Framework: Meier, Spada & Rummel (2007)''</div>')2932 unmodified lines29332934293529362937293829392940294129422943294429451 unmodified line294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530562932 unmodified lines# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ# PAGE 0: Welcome# Hidden buttons kept so wiring stays intact# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββwith gr.Column(visible=True) as pg_welcome:# Hidden nav buttons (agreement / library) β wiring requires them to existagreement_nav_btn = gr.Button(visible=False)library_nav_btn = gr.Button(visible=False)gr.HTML('<div class="cc-hero">''<h1 class="cc-hero-title">CollabCode</h1>'1 unmodified line'for collaborative learning research</p>''</div>')# ββ Primary entry card ββββββββββββββββββββββββββββββββββββββββββββwith gr.Row(equal_height=True):with gr.Column(scale=2):gr.HTML('<div class="cc-entry-card">''<span class="cc-entry-kicker">Primary workflow</span>''<h3 class="cc-entry-title">Code a Transcript</h3>''<p class="cc-entry-desc">Upload a Zoom transcript or load from Drive. ''AI pre-screens turns for metacognitive signals, detects discussion sections, ''finds episode boundaries, and proposes D1βD9 codes β ''you review and confirm every decision.</p>''</div>')start_btn = gr.Button("Start Coding β", variant="primary", size="lg")# ββ About / system logic ββββββββββββββββββββββββββββββββββββββββββgr.HTML('<div style="margin:36px 0 8px;border-top:1px solid var(--cc-border);''padding-top:32px">''<div style="font-weight:800;font-size:1.05em;color:var(--cc-ink);''margin-bottom:20px;letter-spacing:-0.01em">How CollabCode works</div>''</div>')with gr.Row(equal_height=True):gr.HTML('<div class="cc-entry-card" style="border-top:3px solid #ff5a3d">''<span class="cc-entry-kicker">Step 1 β Pre-screen</span>''<h3 class="cc-entry-title" style="font-size:1em">Metacognitive Screener</h3>''<p class="cc-entry-desc">Before any LLM call, every turn is scored against ''a three-tier lexicon (Iiskala 2011; Schoor & Bannert 2012). ''Turns with no metacognitive signal are filtered out β typically cutting ''LLM cost by 40β70 %. Only candidate windows reach Agent 0.</p>''</div>')gr.HTML('<div class="cc-entry-card" style="border-top:3px solid #f59e0b">''<span class="cc-entry-kicker">Step 2 β Structure</span>''<h3 class="cc-entry-title" style="font-size:1em">Agent 0 β Sectioner</h3>''<p class="cc-entry-desc">Agent 0 reads the full transcript and proposes ''thematic sections (e.g. "Problem framing", "Solution negotiation"). ''You rename or merge them before the next stage. ''Sections give Agent 1a its scope and anchor all downstream analysis.</p>''</div>')gr.HTML('<div class="cc-entry-card" style="border-top:3px solid #10b981">''<span class="cc-entry-kicker">Step 3 β Episodes</span>''<h3 class="cc-entry-title" style="font-size:1em">Agent 1a β Boundary Detector</h3>''<p class="cc-entry-desc">Within each section, Agent 1a runs in parallel ''to find episode boundaries β moments where the collaborative activity ''shifts. Boundary proposals are shown to you for review and adjustment ''before coding begins.</p>''</div>')gr.HTML('<div class="cc-entry-card" style="border-top:3px solid #6366f1">''<span class="cc-entry-kicker">Step 4 β Code</span>''<h3 class="cc-entry-title" style="font-size:1em">Agent 1b + Human</h3>''<p class="cc-entry-desc">Agent 1b proposes D1βD9 codes ''(Meier, Spada & Rummel 2007) and SSRL phases (M-MON, M-REG, CO-REG, SSRL) ''for each episode. You code independently first, then reveal the AI proposal ''to resolve ambiguity. All decisions are yours.</p>''</div>')with gr.Row(equal_height=True):gr.HTML('<div class="cc-entry-card" style="border-top:3px solid #0ea5e9">''<span class="cc-entry-kicker">Step 5 β Agreement</span>''<h3 class="cc-entry-title" style="font-size:1em">Inter-rater Reliability</h3>''<p class="cc-entry-desc">Upload a second coder\'s file to compute ''Gwet\'s AC1 (primary) and Cohen\'s ΞΊ (reference) per dimension. ''Disagreements are listed segment by segment so you can resolve ''or flag them for discussion.</p>''</div>')gr.HTML('<div class="cc-entry-card" style="border-top:3px solid #8b5cf6">''<span class="cc-entry-kicker">Step 6 β Learn</span>''<h3 class="cc-entry-title" style="font-size:1em">Agent 2 β Rule Learner</h3>''<p class="cc-entry-desc">After each validated session, Agent 2 induces ''tentative coding rules from agreed codings. Rules are held in Tier 3 ''until a researcher promotes them to the validated lexicon β ''keeping the human firmly in the loop.</p>''</div>')gr.HTML('<div class="cc-entry-card" style="border-top:3px solid #f43f5e">''<span class="cc-entry-kicker">Design principle</span>''<h3 class="cc-entry-title" style="font-size:1em">Human-in-the-loop</h3>''<p class="cc-entry-desc">Every AI action is a proposal, not a decision. ''The researcher confirms sections, adjusts boundaries, codes independently, ''and approves lexicon updates. AI reduces mechanical effort; ''expert judgment drives all coding outcomes.</p>''</div>')gr.HTML('<div style="text-align:center;padding:32px 0 16px;font-size:0.75rem;color:#94a3b8">'f'Model: <strong>{MODEL_ID.split("/")[-1]}</strong> Β· 'f'Temperature: {TEMPERATURE} Β· ''Framework: Meier, Spada & Rummel (2007) Β· Iiskala (2011)''</div>')
app.py+93-24