| {% extends "base.html" %} |
|
|
| {% block title %}Models - TTS Arena Hebrew{% endblock %} |
|
|
| {% block current_page %}Models{% endblock %} |
|
|
| {% block extra_head %} |
| <style> |
| .models-page { |
| direction: ltr; |
| text-align: left; |
| } |
| |
| .models-page h2 { |
| margin-bottom: 8px; |
| color: var(--primary-color); |
| } |
| |
| .models-page .subtitle { |
| color: #666; |
| margin-bottom: 24px; |
| } |
| |
| .models-grid { |
| display: grid; |
| grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); |
| gap: 16px; |
| } |
| |
| .model-card { |
| background: white; |
| border-radius: var(--radius); |
| border: 1px solid var(--border-color); |
| padding: 20px; |
| transition: box-shadow 0.2s; |
| } |
| |
| .model-card:hover { |
| box-shadow: var(--shadow); |
| } |
| |
| .model-card-header { |
| display: flex; |
| align-items: center; |
| justify-content: space-between; |
| margin-bottom: 12px; |
| } |
| |
| .model-card-name { |
| font-size: 18px; |
| font-weight: 600; |
| color: var(--text-color); |
| } |
| |
| .model-card-name a { |
| color: var(--text-color); |
| text-decoration: none; |
| } |
| |
| .model-card-name a:hover { |
| color: var(--primary-color); |
| text-decoration: underline; |
| } |
| |
| .status-badge { |
| font-size: 12px; |
| font-weight: 500; |
| padding: 3px 10px; |
| border-radius: 12px; |
| } |
| |
| .status-active { |
| background-color: rgba(16, 185, 129, 0.1); |
| color: #059669; |
| } |
| |
| .status-inactive { |
| background-color: rgba(239, 68, 68, 0.1); |
| color: #dc2626; |
| } |
| |
| .model-card-details { |
| display: flex; |
| flex-direction: column; |
| gap: 6px; |
| font-size: 14px; |
| color: #555; |
| } |
| |
| .model-detail { |
| display: flex; |
| align-items: baseline; |
| gap: 8px; |
| } |
| |
| .model-detail-label { |
| font-weight: 500; |
| color: #888; |
| min-width: 80px; |
| flex-shrink: 0; |
| } |
| |
| .model-detail-value { |
| color: var(--text-color); |
| font-family: monospace; |
| font-size: 13px; |
| } |
| |
| .model-detail-value a { |
| color: var(--primary-color); |
| text-decoration: none; |
| } |
| |
| .model-detail-value a:hover { |
| text-decoration: underline; |
| } |
| |
| .license-tag { |
| font-size: 11px; |
| font-weight: 500; |
| padding: 2px 8px; |
| border-radius: 4px; |
| background-color: rgba(80, 70, 229, 0.1); |
| color: var(--primary-color); |
| } |
| |
| .license-tag.open { |
| background-color: rgba(16, 185, 129, 0.1); |
| color: #059669; |
| } |
| |
| @media (max-width: 768px) { |
| .models-grid { |
| grid-template-columns: 1fr; |
| } |
| } |
| |
| @media (prefers-color-scheme: dark) { |
| .model-card { |
| background-color: var(--light-gray); |
| border-color: var(--border-color); |
| } |
| |
| .model-card-name a { |
| color: var(--text-color); |
| } |
| |
| .model-card-details { |
| color: #aaa; |
| } |
| |
| .model-detail-label { |
| color: #888; |
| } |
| |
| .models-page .subtitle { |
| color: #aaa; |
| } |
| } |
| </style> |
| {% endblock %} |
|
|
| {% block content %} |
| <div class="models-page"> |
| <h2>Models</h2> |
| <p class="subtitle">TTS models currently available in the Hebrew arena.</p> |
|
|
| <div class="models-grid"> |
| {% for model in models %} |
| <div class="model-card"> |
| <div class="model-card-header"> |
| <span class="model-card-name"> |
| {% if model.model_url %} |
| <a href="{{ model.model_url }}" target="_blank" rel="noopener">{{ model.name }}</a> |
| {% else %} |
| {{ model.name }} |
| {% endif %} |
| </span> |
| {% if model.is_active %} |
| <span class="status-badge status-active">Active</span> |
| {% else %} |
| <span class="status-badge status-inactive">Inactive</span> |
| {% endif %} |
| </div> |
| <div class="model-card-details"> |
| <div class="model-detail"> |
| <span class="model-detail-label">API Model</span> |
| <span class="model-detail-value">{{ model.api_model_id or model.id }}</span> |
| </div> |
| {% if model.voice %} |
| <div class="model-detail"> |
| <span class="model-detail-label">Voice</span> |
| <span class="model-detail-value">{{ model.voice }}</span> |
| </div> |
| {% endif %} |
| <div class="model-detail"> |
| <span class="model-detail-label">Type</span> |
| <span class="model-detail-value">{{ "Streaming" if model.is_streaming else "Batch" }}</span> |
| </div> |
| <div class="model-detail"> |
| <span class="model-detail-label">License</span> |
| <span class="license-tag {% if model.is_open %}open{% endif %}"> |
| {{ "Open Source" if model.is_open else "Proprietary" }} |
| </span> |
| </div> |
| {% if model.model_url %} |
| <div class="model-detail"> |
| <span class="model-detail-label">Website</span> |
| <span class="model-detail-value"><a href="{{ model.model_url }}" target="_blank" rel="noopener">{{ model.model_url | replace("https://", "") | replace("http://", "") | truncate(40) }}</a></span> |
| </div> |
| {% endif %} |
| {% if model.notes %} |
| <div class="model-detail"> |
| <span class="model-detail-label">Config</span> |
| <span class="model-detail-value">{{ model.notes }}</span> |
| </div> |
| {% endif %} |
| {% if model.match_count > 0 %} |
| <div class="model-detail"> |
| <span class="model-detail-label">Matches</span> |
| <span class="model-detail-value">{{ model.match_count }} (ELO: {{ model.current_elo | int }})</span> |
| </div> |
| {% endif %} |
| </div> |
| </div> |
| {% endfor %} |
| </div> |
| </div> |
| {% endblock %} |
|
|