Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse filesFiles changed (2)
176 unmodified lines177178179180181182183184185186187188189190176 unmodified linesreturn (<div className="relative w-full h-full bg-black">{/* Loading Overlay */}{isBuilding && (<div className="absolute inset-0 z-50 flex flex-col items-center justify-center bg-black/80 backdrop-blur-sm transition-opacity duration-300"><div className="w-16 h-16 border-4 border-teal-900 border-t-teal-500 rounded-full animate-spin mb-4"></div><p className="text-teal-400 font-mono animate-pulse">Constructing Focus Group Graph...</p></div>)}{/* The Graph */}<div ref={graphDiv} className="w-full h-full" />176 unmodified lines177178179180181182176 unmodified linesreturn (<div className="relative w-full h-full bg-black">{/* The Graph */}<div ref={graphDiv} className="w-full h-full" />
449 unmodified lines45045145245345445516 unmodified lines47247347447547647747847948048148248349 unmodified lines533534535536537538449 unmodified linesonClick={async () => {if (activeModal === 'assemble') {setIsBuilding(true);try {// 1. Generate personas based on profile and company infoconst personas = await GradioService.generatePersonas(formData.companyInfo, formData.customerProfile, Math.ceil(formData.personaScale / 20));16 unmodified lines// 4. Update UIsetSocieties(prev => [groupName, ...prev]);setSociety(groupName);setActiveModal('none');alert('Focus group assembled and selected!');} catch (e) {console.error(e);alert('Failed to assemble group via API. Falling back to local save.');setActiveModal('none');} finally {setIsBuilding(false);}49 unmodified lines<button onClick={() => setIsRightPanelOpen(false)} className="text-gray-500 hover:text-white"><PanelRightClose size={18}/></button></div><div className="flex-1 overflow-y-auto p-4 space-y-4"><div className="bg-gray-900/50 border border-gray-800 rounded-xl p-4"><div className="flex items-center justify-between mb-2"><p className="text-xs text-gray-500">Simulation Results</p>449 unmodified lines45045145245345445545645716 unmodified lines47447547647747847948048148248349 unmodified lines533534535536537538539540541542543544545546547548549550449 unmodified linesonClick={async () => {if (activeModal === 'assemble') {setIsBuilding(true);setIsRightPanelOpen(true);setActiveModal('none');try {// 1. Generate personas based on profile and company infoconst personas = await GradioService.generatePersonas(formData.companyInfo, formData.customerProfile, Math.ceil(formData.personaScale / 20));16 unmodified lines// 4. Update UIsetSocieties(prev => [groupName, ...prev]);setSociety(groupName);alert('Focus group assembled and selected!');} catch (e) {console.error(e);alert('Failed to assemble group via API.');} finally {setIsBuilding(false);}49 unmodified lines<button onClick={() => setIsRightPanelOpen(false)} className="text-gray-500 hover:text-white"><PanelRightClose size={18}/></button></div><div className="flex-1 overflow-y-auto p-4 space-y-4">{isBuilding && (<div className="bg-teal-900/20 border border-teal-500/30 rounded-xl p-4 mb-4 animate-in fade-in slide-in-from-top-2"><div className="flex items-center gap-3"><RefreshCw className="w-4 h-4 text-teal-400 animate-spin" /><div className="flex flex-col"><span className="text-xs font-bold text-teal-400">Assembling...</span><span className="text-[10px] text-teal-400/60 font-mono">Constructing network mesh</span></div></div></div>)}<div className="bg-gray-900/50 border border-gray-800 rounded-xl p-4"><div className="flex items-center justify-between mb-2"><p className="text-xs text-gray-500">Simulation Results</p>
components/SimulationGraph.tsx-8
components/SimulationPage.tsx+15-3