feat: Add new API endpoints and HTML pages for ML model management
- Implemented HTML pages for datasets, models, training, testing, and results. - Created API endpoints for managing repositories, results, tests, and training sessions. - Added functionality for streaming training progress via Server-Sent Events (SSE). - Introduced a Dockerfile for the ML runner with necessary dependencies. - Developed an SDK for user code execution within the runner container. - Enhanced CSS styles for improved UI layout and navigation. - Established a layout template for consistent HTML structure across pages. - Added JavaScript for dynamic interactions on the models page. - Implemented WebSocket handling for real-time communication with kiosk devices and controllers. - Implemented model registration and management API at /api/models - Added Gitea proxy API for repository interactions at /api/repos - Created results API for listing and comparing training results at /api/results - Developed training management API for enqueueing and retrieving training jobs at /api/trainings - Introduced SSE endpoint for live training progress updates - Added HTML pages for models, datasets, and training management - Created a Dockerfile for the ML runner with necessary dependencies - Developed SDK for user code execution within the runner container - Enhanced CSS styles for improved UI/UX - Implemented WebSocket communication for real-time device and controller interactions in the kiosk system
This commit is contained in:
57
ml/templates/models.html
Normal file
57
ml/templates/models.html
Normal file
@@ -0,0 +1,57 @@
|
||||
{% extends "_layout.html" %}
|
||||
{% block title %}Modelli{% endblock %}
|
||||
{% block content %}
|
||||
<div class="page-head">
|
||||
<h2>Modelli</h2>
|
||||
<button class="prominent" id="btn-add-model">+ Aggiungi modello</button>
|
||||
</div>
|
||||
|
||||
<div id="models-list" class="list"></div>
|
||||
|
||||
<div id="model-detail" class="detail hidden">
|
||||
<button id="btn-close-detail">×</button>
|
||||
<h3 id="md-name"></h3>
|
||||
<p id="md-meta"></p>
|
||||
<section>
|
||||
<h4>Branch / Commits</h4>
|
||||
<select id="md-branch"></select>
|
||||
<ul id="md-commits"></ul>
|
||||
</section>
|
||||
<section>
|
||||
<h4>model.yml</h4>
|
||||
<pre id="md-spec"></pre>
|
||||
</section>
|
||||
<section>
|
||||
<h4>Note</h4>
|
||||
<ul id="md-notes"></ul>
|
||||
<form id="md-note-form">
|
||||
<textarea name="text" placeholder="Nuova nota"></textarea>
|
||||
<button type="submit" class="prominent">Aggiungi</button>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<dialog id="add-model-dlg">
|
||||
<form id="add-model-form" method="dialog">
|
||||
<h3>Nuovo modello</h3>
|
||||
<label>Nome<input type="text" name="name" required></label>
|
||||
<label>Tipo
|
||||
<select name="type">
|
||||
<option>xgboost</option>
|
||||
<option>lstm</option>
|
||||
<option>sklearn</option>
|
||||
<option>other</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>Repo Gitea (owner/repo)<input type="text" name="gitea_repo" required></label>
|
||||
<label>Branch<input type="text" name="default_branch" value="main"></label>
|
||||
<menu>
|
||||
<button type="button" id="add-model-cancel">Annulla</button>
|
||||
<button type="submit" class="prominent">Crea</button>
|
||||
</menu>
|
||||
</form>
|
||||
</dialog>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="/static/js/models.js"></script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user