File size: 18,009 Bytes
b190b45 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
<!DOCTYPE html>
<html lang="en" dir="ltr" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Permissions-Policy" content="accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()">
<meta name="description" content="Crypto Monitor - AI Models Management">
<meta name="theme-color" content="#8B5CF6">
<title>AI Models | Crypto Monitor</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%238B5CF6'/%3E%3Cstop offset='100%25' stop-color='%236D28D9'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='50' cy='50' r='45' fill='url(%23g)'/%3E%3Ctext x='50' y='65' font-size='50' text-anchor='middle' fill='white' font-weight='bold'%3EC%3C/text%3E%3C/svg%3E">
<!-- Cursor-Inspired Design System -->
<link rel="stylesheet" href="/static/shared/css/design-system-cursor.css">
<link rel="stylesheet" href="/static/shared/css/layout-cursor.css">
<link rel="stylesheet" href="/static/shared/css/components-cursor.css">
<link rel="stylesheet" href="/static/shared/css/animations-cursor.css">
<!-- Page-specific CSS -->
<link rel="stylesheet" href="/static/pages/models/models.css">
<!-- API Configuration - Smart Fallback System -->
<script src="/static/js/api-config.js"></script>
<script>
// Initialize API client
window.apiReady = new Promise((resolve) => {
if (window.apiClient) {
console.log('β
API Client ready');
resolve(window.apiClient);
} else {
console.error('β API Client not loaded');
}
});
</script>
</head>
<body>
<!-- Background Effects -->
<div class="background-effects">
<div class="gradient-orb orb-1"></div>
<div class="gradient-orb orb-2"></div>
<div class="gradient-orb orb-3"></div>
</div>
<div class="app-container">
<aside id="sidebar-container"></aside>
<main class="main-content">
<header id="header-container"></header>
<div class="page-content">
<!-- Page Header -->
<div class="page-header glass-panel">
<div class="page-title">
<div class="title-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 4.44-2z"></path><path d="M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-4.44-2z"></path></svg>
</div>
<div class="title-content">
<h1>AI Models Hub</h1>
<p class="page-subtitle">Hugging Face Models β’ Sentiment Analysis β’ Self-Healing</p>
</div>
</div>
<div class="page-actions">
<button id="refresh-btn" class="btn-gradient" title="Refresh models">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>
<span>Refresh</span>
</button>
<span id="last-update" class="last-update">Loading...</span>
</div>
</div>
<!-- Summary Stats Cards -->
<div class="stats-grid" id="stats-grid">
<div class="stat-card glass-card">
<div class="stat-icon models-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line></svg>
</div>
<div class="stat-content">
<div class="stat-value" id="total-models">--</div>
<div class="stat-label">Total Models</div>
<div class="stat-trend neutral">Available in Registry</div>
</div>
</div>
<div class="stat-card glass-card">
<div class="stat-icon success-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
</div>
<div class="stat-content">
<div class="stat-value" id="active-models">--</div>
<div class="stat-label">Loaded & Ready</div>
<div class="stat-trend success">Active pipelines</div>
</div>
</div>
<div class="stat-card glass-card">
<div class="stat-icon warning-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
</div>
<div class="stat-content">
<div class="stat-value" id="failed-models">--</div>
<div class="stat-label">Failed / Unavailable</div>
<div class="stat-trend warning">Needs attention</div>
</div>
</div>
<div class="stat-card glass-card">
<div class="stat-icon info-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path><path d="m9 12 2 2 4-4"></path></svg>
</div>
<div class="stat-content">
<div class="stat-value" id="hf-mode">--</div>
<div class="stat-label">HF Mode</div>
<div class="stat-trend info" id="hf-status">Checking...</div>
</div>
</div>
</div>
<!-- Tab Navigation -->
<div class="tabs-container glass-panel">
<div class="tabs">
<button class="tab-btn active" data-tab="models-list">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>
<span>Models List</span>
</button>
<button class="tab-btn" data-tab="test-model">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>
<span>Test Model</span>
</button>
<button class="tab-btn" data-tab="health-monitor">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>
<span>Health Monitor</span>
</button>
<button class="tab-btn" data-tab="model-catalog">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>
<span>Catalog</span>
</button>
</div>
</div>
<!-- Tab Content: Models List -->
<div id="tab-models-list" class="tab-content active">
<div class="section-header">
<h2>Available AI Models</h2>
<div class="filter-controls">
<select id="category-filter" class="select-modern">
<option value="all">All Categories</option>
<option value="sentiment_crypto">Crypto Sentiment</option>
<option value="sentiment_financial">Financial Sentiment</option>
<option value="sentiment_social">Social Sentiment</option>
<option value="sentiment_news">News Sentiment</option>
<option value="analysis_generation">AI Generation</option>
<option value="trading_signal">Trading Signals</option>
<option value="summarization">Summarization</option>
</select>
<select id="status-filter" class="select-modern">
<option value="all">All Status</option>
<option value="loaded">Loaded</option>
<option value="available">Available</option>
<option value="failed">Failed</option>
</select>
</div>
</div>
<div class="models-grid" id="models-grid">
<div class="loading-state">
<div class="loading-spinner"></div>
<p class="loading-text">Loading models...</p>
</div>
</div>
</div>
<!-- Tab Content: Test Model -->
<div id="tab-test-model" class="tab-content">
<div class="test-panel glass-panel">
<div class="test-header">
<h2>π§ͺ Test AI Models</h2>
<p>Enter text to analyze with our Hugging Face models</p>
</div>
<div class="test-form">
<div class="form-group">
<label class="form-label">Select Model</label>
<select id="test-model-select" class="select-modern large">
<option value="">Loading models...</option>
</select>
</div>
<div class="form-group">
<label class="form-label">Text to Analyze</label>
<textarea id="test-input" class="textarea-modern" rows="5" placeholder="Enter text to analyze... Example: Bitcoin is showing strong bullish momentum with increasing volume."></textarea>
</div>
<div class="test-actions">
<button id="run-test-btn" class="btn-gradient large">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>
<span>Run Analysis</span>
</button>
<button id="clear-test-btn" class="btn-secondary">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path></svg>
<span>Clear</span>
</button>
</div>
<div class="example-texts">
<p class="example-label">Quick examples:</p>
<div class="example-buttons">
<button class="example-btn" data-text="Bitcoin is showing strong bullish momentum with increasing volume">π Bullish</button>
<button class="example-btn" data-text="Market crash expected due to regulatory concerns and sell-off pressure">π Bearish</button>
<button class="example-btn" data-text="Ethereum network upgrade completed successfully, community positive">β
Positive News</button>
<button class="example-btn" data-text="BTC price consolidating around support levels with low volatility">β‘οΈ Neutral</button>
</div>
</div>
</div>
<div id="test-result" class="test-result hidden">
<div class="result-header">
<h3>Analysis Result</h3>
<span class="result-time" id="result-time"></span>
</div>
<div class="result-body">
<div class="sentiment-display" id="sentiment-display">
<div class="sentiment-emoji" id="sentiment-emoji">π</div>
<div class="sentiment-label" id="sentiment-label">--</div>
<div class="sentiment-confidence" id="sentiment-confidence">--</div>
</div>
<div class="result-details" id="result-details">
<pre class="result-json"></pre>
</div>
</div>
</div>
</div>
</div>
<!-- Tab Content: Health Monitor -->
<div id="tab-health-monitor" class="tab-content">
<div class="health-panel glass-panel">
<div class="health-header">
<h2>π₯ Model Health Monitor</h2>
<p>Track model status, errors, and self-healing capabilities</p>
<button id="reinit-all-btn" class="btn-gradient">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="23 4 23 10 17 10"></polyline><path d="M21 14a9 9 0 0 1-18 0 9 9 0 0 1 18 0"></path></svg>
<span>Re-initialize All</span>
</button>
</div>
<div class="health-grid" id="health-grid">
<div class="loading-state">
<div class="loading-spinner"></div>
<p class="loading-text">Loading health data...</p>
</div>
</div>
</div>
</div>
<!-- Tab Content: Model Catalog -->
<div id="tab-model-catalog" class="tab-content">
<div class="catalog-panel glass-panel">
<div class="catalog-header">
<h2>π Model Catalog</h2>
<p>Complete reference of available AI models organized by category</p>
</div>
<div class="catalog-grid" id="catalog-grid">
<!-- Crypto Sentiment -->
<div class="catalog-category">
<div class="category-header crypto">
<span class="category-icon">βΏ</span>
<h3>Crypto Sentiment</h3>
</div>
<div class="category-models" id="catalog-crypto">
<!-- Populated by JS -->
</div>
</div>
<!-- Financial Sentiment -->
<div class="catalog-category">
<div class="category-header financial">
<span class="category-icon">πΉ</span>
<h3>Financial Sentiment</h3>
</div>
<div class="category-models" id="catalog-financial">
<!-- Populated by JS -->
</div>
</div>
<!-- Social Sentiment -->
<div class="catalog-category">
<div class="category-header social">
<span class="category-icon">π¬</span>
<h3>Social Sentiment</h3>
</div>
<div class="category-models" id="catalog-social">
<!-- Populated by JS -->
</div>
</div>
<!-- Trading Signals -->
<div class="catalog-category">
<div class="category-header trading">
<span class="category-icon">π</span>
<h3>Trading Signals</h3>
</div>
<div class="category-models" id="catalog-trading">
<!-- Populated by JS -->
</div>
</div>
<!-- Generation -->
<div class="catalog-category">
<div class="category-header generation">
<span class="category-icon">π€</span>
<h3>AI Generation</h3>
</div>
<div class="category-models" id="catalog-generation">
<!-- Populated by JS -->
</div>
</div>
<!-- Summarization -->
<div class="catalog-category">
<div class="category-header summarization">
<span class="category-icon">π</span>
<h3>Summarization</h3>
</div>
<div class="category-models" id="catalog-summarization">
<!-- Populated by JS -->
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div id="toast-container" aria-live="polite" aria-atomic="true"></div>
<!-- Initialize layout and page -->
<script type="module">
import { LayoutManager } from '/static/shared/js/core/layout-manager.js';
// Initialize layouts first
await LayoutManager.init('models');
// Then load page module
await import('/static/pages/models/models.js');
</script>
</body>
</html>
|