FlagshipAi / AIStrategy /app /static /index.html
Ali2206's picture
Add remaining agents to Hugging Face Space
0d75857
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Strategy Coach Bot</title>
<link rel="stylesheet" href="/static/suite.css"/>
<style>
.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:12px}
</style>
</head>
<body>
<div id="suite-shared-header"></div>
<div class="container">
<h1>Strategy Coach Bot</h1>
<p class="muted">Input a product idea — get a verdict: AI as a feature vs AI as the product.</p>
<div class="grid two-col">
<div class="card">
<label for="idea">Product idea</label>
<textarea id="idea" rows="8" placeholder="Describe the user, problem, workflow, and where AI could help"></textarea>
<label for="ctx">Optional business context</label>
<textarea id="ctx" rows="6" placeholder="Constraints, competitors, goals"></textarea>
<div class="actions"><button id="go" class="btn">Advise</button></div>
</div>
<div class="card" id="out" style="display:none"></div>
</div>
</div>
<script src="/static/header.js"></script>
<script>
const out=document.getElementById('out');
document.getElementById('go').addEventListener('click', async ()=>{
const payload={product_idea:(document.getElementById('idea').value||''), context:(document.getElementById('ctx').value||null)};
out.style.display='block'; out.innerHTML='<div class="muted">(thinking...)</div>';
try{
const res=await fetch('/strategy/advise',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(payload)});
if(!res.ok) throw new Error(await res.text());
const d=await res.json();
const vlabel={feature:'AI should be a feature', product:'AI is the product', unclear:'Unclear'}[d.verdict]||d.verdict;
const list=(a)=> (a||[]).map(x=>`<li>${(x||'').replace(/</g,'&lt;').replace(/>/g,'&gt;')}</li>`).join('')||'<li class="muted">None</li>';
out.innerHTML=`
<h2>${vlabel}</h2>
<h3>Rationale</h3><ul>${list(d.rationale)}</ul>
<h3>Differentiation & Moat</h3><ul>${list(d.differentiation)}</ul>
<h3>MVP Scope</h3><ul>${list(d.scope_mvp)}</ul>
<h3>Risks</h3><ul>${list(d.risks)}</ul>
<h3>Next steps</h3><ul>${list(d.next_steps)}</ul>
`;
}catch(e){ out.innerHTML=`<div style="color:#b91c1c;">Error: ${String(e)}</div>`; }
});
</script>
</body>
</html>