ten / simple_next_app.js
3v324v23's picture
Fix permissions issues on HuggingFace Space: Add fallback UI options
bbc9709
// File: /tmp/ten_playground/app/page.js
// Simple Next.js app that redirects to API server
export default function Home() {
return (
<div style={{ padding: '20px', fontFamily: 'Arial, sans-serif' }}>
<h1>TEN Agent UI Loader</h1>
<p>API server is running at: <a href="http://localhost:8080">http://localhost:8080</a></p>
<div style={{ marginTop: '20px', padding: '10px', backgroundColor: '#f0f0f0', borderRadius: '5px' }}>
<p>Используйте API напрямую:</p>
<ul>
<li><a href="http://localhost:8080/graphs">/graphs</a> - Список доступных графов</li>
<li><a href="http://localhost:8080/health">/health</a> - Статус API сервера</li>
</ul>
</div>
<div style={{ marginTop: '20px' }}>
<button
style={{
padding: '10px 15px',
backgroundColor: '#4CAF50',
color: 'white',
border: 'none',
borderRadius: '5px',
cursor: 'pointer'
}}
onClick={() => window.location.href = 'http://localhost:8080/graphs'}
>
Перейти к API
</button>
</div>
</div>
);
}