Spaces:
Sleeping
Sleeping
Download templates/predict_locked.html from Nausad/Data2Model: direct link, hf CLI and curl.
- Browser
- Download file 4.5 kB
-
https://huggingface.co/spaces/Nausad/Data2Model/resolve/main/templates/predict_locked.html
- Command line
-
hf download hf://spaces/Nausad/Data2Model/templates/predict_locked.html
-
curl -L -o predict_locked.html https://huggingface.co/spaces/Nausad/Data2Model/resolve/main/templates/predict_locked.html
4.5 kB
| {% extends "base.html" %} | |
| {% block title %}Predict — Locked | Data2Model{% endblock %} | |
| {% block content %} | |
| <div class="container my-5"> | |
| <div class="col-lg-7 mx-auto text-center"> | |
| <!-- Lock Icon --> | |
| <div class="mb-4"> | |
| <div class="lock-circle mx-auto mb-3"> | |
| <i class="fas fa-lock fa-4x text-secondary"></i> | |
| </div> | |
| <h1 class="display-5 fw-bold">Prediction Locked</h1> | |
| <p class="lead text-muted"> | |
| The Predict page is only available after training a model with a | |
| <strong>Train / Test / Validation</strong> split. | |
| </p> | |
| </div> | |
| <!-- Why locked? --> | |
| <div class="card shadow mb-4 text-start"> | |
| <div class="card-header bg-warning text-dark"> | |
| <h5 class="mb-0"><i class="fas fa-question-circle"></i> Why is this locked?</h5> | |
| </div> | |
| <div class="card-body"> | |
| {% if not model_trained %} | |
| <div class="d-flex align-items-start gap-3 mb-3"> | |
| <span class="badge bg-danger fs-6 mt-1">1</span> | |
| <div> | |
| <strong>No model trained yet</strong><br> | |
| <span class="text-muted">You haven't uploaded and trained any model. Go to the Home page to begin.</span> | |
| </div> | |
| </div> | |
| {% else %} | |
| <div class="d-flex align-items-start gap-3 mb-3"> | |
| <span class="badge bg-warning text-dark fs-6 mt-1">!</span> | |
| <div> | |
| <strong>Model trained with 2-way split only</strong><br> | |
| <span class="text-muted"> | |
| Your last training used a <em>Train / Test</em> split only (no validation set). | |
| A validation set is required to ensure the model is properly evaluated before predictions. | |
| </span> | |
| </div> | |
| </div> | |
| {% endif %} | |
| </div> | |
| </div> | |
| <!-- 3-step workflow --> | |
| <div class="card shadow mb-4 text-start"> | |
| <div class="card-header bg-primary text-white"> | |
| <h5 class="mb-0"><i class="fas fa-unlock-alt"></i> How to Unlock Predictions</h5> | |
| </div> | |
| <div class="card-body"> | |
| <div class="d-flex align-items-start gap-3 mb-3"> | |
| <div class="step-badge bg-primary text-white">1</div> | |
| <div> | |
| <strong>Upload your dataset</strong> on the Home page | |
| </div> | |
| </div> | |
| <div class="d-flex align-items-start gap-3 mb-3"> | |
| <div class="step-badge bg-primary text-white">2</div> | |
| <div> | |
| <strong>On the Configure page</strong>, select | |
| <span class="badge bg-success">Train / Test / Validation Split</span> | |
| under "Data Split Strategy" | |
| <div class="text-muted small mt-1"> | |
| This splits your data into 3 parts — e.g. 60% training, 20% testing, 20% validation | |
| </div> | |
| </div> | |
| </div> | |
| <div class="d-flex align-items-start gap-3"> | |
| <div class="step-badge bg-success text-white">3</div> | |
| <div> | |
| <strong>Train the model.</strong> | |
| The Predict page will automatically unlock after successful training with validation. | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Why validation matters --> | |
| <div class="card shadow mb-4 text-start border-info"> | |
| <div class="card-body"> | |
| <h6 class="text-info"><i class="fas fa-info-circle"></i> Why is a validation set required?</h6> | |
| <p class="mb-0 text-muted small"> | |
| A model evaluated only on training + test data might be over-fitted or misleadingly accurate. | |
| The <strong>validation set</strong> is a completely separate portion of data the model never sees | |
| during training, giving a true measure of how well it will perform on real-world new data. | |
| Only after passing this check is the model trustworthy enough for making predictions. | |
| </p> | |
| </div> | |
| </div> | |
| <!-- Action buttons --> | |
| <div class="d-grid gap-2"> | |
| <a href="{{ url_for('index') }}" class="btn btn-primary btn-lg"> | |
| <i class="fas fa-upload"></i> Go to Home — Upload & Train | |
| </a> | |
| {% if model_trained %} | |
| <p class="text-muted small mt-1"> | |
| Your previous model is still saved. Simply re-train with the 3-way split to unlock predictions. | |
| </p> | |
| {% endif %} | |
| </div> | |
| </div> | |
| </div> | |
| <style> | |
| .lock-circle { | |
| width: 100px; height: 100px; | |
| border-radius: 50%; | |
| background: #f8f9fa; | |
| border: 3px solid #dee2e6; | |
| display: flex; align-items: center; justify-content: center; | |
| } | |
| .step-badge { | |
| min-width: 32px; height: 32px; | |
| border-radius: 50%; | |
| display: flex; align-items: center; justify-content: center; | |
| font-weight: 700; flex-shrink: 0; | |
| } | |
| </style> | |
| {% endblock %} | |