Spaces:
Sleeping
Sleeping
Upload 12 files
Browse files- static/css/style.css +154 -0
- static/img/background.webp +0 -0
- static/js/main.js +10 -0
- templates/about.html +16 -0
- templates/base.html +96 -0
- templates/constraints.html +23 -0
- templates/dashboard.html +78 -0
- templates/dataset.html +29 -0
- templates/generative.html +28 -0
- templates/login.html +0 -0
- templates/mixture_predictor.html +11 -0
- templates/pure_predictor.html +163 -0
static/css/style.css
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* body background image */
|
| 2 |
+
|
| 3 |
+
body {
|
| 4 |
+
background: url("../img/background.webp") no-repeat center center fixed;
|
| 5 |
+
background-size: cover;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
/* glass sidebar styles */
|
| 9 |
+
|
| 10 |
+
.glass-sidebar {
|
| 11 |
+
min-width: 200px;
|
| 12 |
+
max-width: 200px;
|
| 13 |
+
min-height: 100vh;
|
| 14 |
+
|
| 15 |
+
/* Glass blur effect */
|
| 16 |
+
background: rgba(72, 95, 74, 0.45);
|
| 17 |
+
backdrop-filter: blur(15px);
|
| 18 |
+
-webkit-backdrop-filter: blur(15px);
|
| 19 |
+
|
| 20 |
+
/* Rounded edges */
|
| 21 |
+
border-radius: 20px;
|
| 22 |
+
margin: 15px;
|
| 23 |
+
|
| 24 |
+
/* Edge shadow*/
|
| 25 |
+
box-shadow:
|
| 26 |
+
inset 0 0 25px rgba(255, 255, 255, 0.04),
|
| 27 |
+
0 12px 32px rgba(0, 0, 0, 0.25);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
/* sidebar items */
|
| 31 |
+
|
| 32 |
+
.list-group {
|
| 33 |
+
background: transparent ;
|
| 34 |
+
border: none ;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.list-group-item {
|
| 38 |
+
background: transparent ;
|
| 39 |
+
border: none ;
|
| 40 |
+
color: #010202;
|
| 41 |
+
padding: 12px 22px;
|
| 42 |
+
font-size: 0.95rem;
|
| 43 |
+
transition: all 0.25s ease;
|
| 44 |
+
border-radius: 10px;
|
| 45 |
+
font-weight: 500;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.sidebar-link i {
|
| 49 |
+
color: #53062a;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
/* Hover */
|
| 53 |
+
.sidebar-link:hover {
|
| 54 |
+
background: rgba(255, 255, 255, 0.15) ;
|
| 55 |
+
color: white ;
|
| 56 |
+
font-weight: 600;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.sidebar-link:hover i {
|
| 60 |
+
color: white;
|
| 61 |
+
font-weight: 600;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/* Active Highlight Pill */
|
| 65 |
+
.sidebar-link.active {
|
| 66 |
+
background: linear-gradient(135deg, #445750, #324e44) ;
|
| 67 |
+
color: white ;
|
| 68 |
+
font-weight: 600;
|
| 69 |
+
border-radius: 12px;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.sidebar-link.active i {
|
| 73 |
+
color: white ;
|
| 74 |
+
font-weight: 600;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
/* Sidebar collapsed state */
|
| 78 |
+
.glass-sidebar.collapsed {
|
| 79 |
+
margin-left: -220px; /* hides it */
|
| 80 |
+
opacity: 0;
|
| 81 |
+
transition: all 0.35s ease;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
/* Animate opening */
|
| 85 |
+
.glass-sidebar {
|
| 86 |
+
transition: all 0.35s ease;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
/* navbar styles */
|
| 90 |
+
|
| 91 |
+
.navbar {
|
| 92 |
+
background: #113529 ;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.navbar .btn {
|
| 96 |
+
border-color: white;
|
| 97 |
+
color: white;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
.navbar .btn:hover {
|
| 101 |
+
background-color: rgba(255, 255, 255, 0.15);
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.navbar-title-center {
|
| 105 |
+
position: absolute;
|
| 106 |
+
left: 50%;
|
| 107 |
+
top: 50%;
|
| 108 |
+
transform: translate(-50%, -50%);
|
| 109 |
+
color: white;
|
| 110 |
+
font-size: 1.25rem;
|
| 111 |
+
font-weight: 600;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
/* cards */
|
| 115 |
+
|
| 116 |
+
.card-metric {
|
| 117 |
+
border: none;
|
| 118 |
+
border-radius: 16px;
|
| 119 |
+
background: linear-gradient(
|
| 120 |
+
135deg,
|
| 121 |
+
#a5b474 0%,
|
| 122 |
+
#7cc29a 100%
|
| 123 |
+
);
|
| 124 |
+
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
|
| 125 |
+
padding: 1.5rem;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
/* buttons */
|
| 129 |
+
.btn-primary {
|
| 130 |
+
background-color: #595951;
|
| 131 |
+
border-color: #302f2c;
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
.btn-primary:hover {
|
| 135 |
+
background-color: #ffffff;
|
| 136 |
+
color: #000000;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.btn-secondary {
|
| 140 |
+
background-color: #595951;
|
| 141 |
+
border-color: #302f2c;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.btn-secondary:hover {
|
| 145 |
+
background-color: #ffffff;
|
| 146 |
+
color: #000000;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
/* table */
|
| 150 |
+
|
| 151 |
+
.table-striped tbody tr:nth-of-type(odd) {
|
| 152 |
+
background-color: #ecfdf5;
|
| 153 |
+
}
|
| 154 |
+
|
static/img/background.webp
ADDED
|
static/js/main.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener("DOMContentLoaded", function () {
|
| 2 |
+
const wrapper = document.getElementById("wrapper");
|
| 3 |
+
const sidebar = document.getElementById("sidebar-wrapper");
|
| 4 |
+
const toggleBtn = document.getElementById("sidebarToggle");
|
| 5 |
+
|
| 6 |
+
toggleBtn.addEventListener("click", function () {
|
| 7 |
+
// toggle hidden state
|
| 8 |
+
sidebar.classList.toggle("collapsed");
|
| 9 |
+
});
|
| 10 |
+
});
|
templates/about.html
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
{% block content %}
|
| 3 |
+
|
| 4 |
+
<div class="container py-4">
|
| 5 |
+
|
| 6 |
+
<h3 class="fw-bold mb-4">About This Project</h3>
|
| 7 |
+
|
| 8 |
+
<div class="card card-metric p-4 mb-4">
|
| 9 |
+
<p>
|
| 10 |
+
<strong>BioFuelOpt</strong> is a.... more info to be added here...also add contributors, GitHub link, etc...
|
| 11 |
+
</p>
|
| 12 |
+
</div>
|
| 13 |
+
|
| 14 |
+
</div>
|
| 15 |
+
|
| 16 |
+
{% endblock %}
|
templates/base.html
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<title>BioFuelOpt</title>
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 7 |
+
|
| 8 |
+
<!-- Bootstrap 5 -->
|
| 9 |
+
<link
|
| 10 |
+
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
|
| 11 |
+
rel="stylesheet">
|
| 12 |
+
|
| 13 |
+
<!-- Icons -->
|
| 14 |
+
<link
|
| 15 |
+
rel="stylesheet"
|
| 16 |
+
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
| 17 |
+
|
| 18 |
+
<!-- Custom CSS -->
|
| 19 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
| 20 |
+
</head>
|
| 21 |
+
|
| 22 |
+
<body>
|
| 23 |
+
|
| 24 |
+
<div class="d-flex" id="wrapper">
|
| 25 |
+
|
| 26 |
+
<!-- Sidebar: REPLACED WITH GLASSMORPHISM -->
|
| 27 |
+
<nav id="sidebar-wrapper" class="glass-sidebar">
|
| 28 |
+
|
| 29 |
+
<div class="sidebar-header text-center py-4">
|
| 30 |
+
<h5 class="fw-bold m-0">BioFuelOpt 1.0</h5>
|
| 31 |
+
</div>
|
| 32 |
+
|
| 33 |
+
<div class="list-group list-group-flush mt-3">
|
| 34 |
+
|
| 35 |
+
<a href="{{ url_for('dashboard') }}"
|
| 36 |
+
class="list-group-item sidebar-link {% if request.endpoint == 'dashboard' %}active{% endif %}">
|
| 37 |
+
<i class="bi bi-speedometer2 me-3"></i>Dashboard
|
| 38 |
+
</a>
|
| 39 |
+
|
| 40 |
+
<a href="{{ url_for('pure_predictor') }}"
|
| 41 |
+
class="list-group-item sidebar-link {% if request.endpoint == 'pure_predictor' %}active{% endif %}">
|
| 42 |
+
<i class="bi bi-droplet-half me-3"></i>Pure fuel predictor
|
| 43 |
+
</a>
|
| 44 |
+
|
| 45 |
+
<a href="{{ url_for('mixture_predictor') }}"
|
| 46 |
+
class="list-group-item sidebar-link {% if request.endpoint == 'mixture_predictor' %}active{% endif %}">
|
| 47 |
+
<i class="bi bi-bezier2 me-3"></i>Mixture fuel predictor
|
| 48 |
+
</a>
|
| 49 |
+
|
| 50 |
+
<a href="{{ url_for('generative') }}"
|
| 51 |
+
class="list-group-item sidebar-link {% if request.endpoint == 'generative' %}active{% endif %}">
|
| 52 |
+
<i class="bi bi-stars me-3"></i>Generative molecule
|
| 53 |
+
</a>
|
| 54 |
+
|
| 55 |
+
<a href="{{ url_for('constraints') }}"
|
| 56 |
+
class="list-group-item sidebar-link {% if request.endpoint == 'constraints' %}active{% endif %}">
|
| 57 |
+
<i class="bi bi-sliders me-3"></i>Fuel constraints
|
| 58 |
+
</a>
|
| 59 |
+
|
| 60 |
+
<a href="{{ url_for('dataset') }}"
|
| 61 |
+
class="list-group-item sidebar-link {% if request.endpoint == 'dataset' %}active{% endif %}">
|
| 62 |
+
<i class="bi bi-table me-3"></i>Dataset
|
| 63 |
+
</a>
|
| 64 |
+
|
| 65 |
+
<a href="{{ url_for('about') }}"
|
| 66 |
+
class="list-group-item sidebar-link {% if request.endpoint == 'about' %}active{% endif %}">
|
| 67 |
+
<i class="bi bi-info-circle me-3"></i>About
|
| 68 |
+
</a>
|
| 69 |
+
|
| 70 |
+
</div>
|
| 71 |
+
|
| 72 |
+
</nav>
|
| 73 |
+
|
| 74 |
+
<!-- Page content -->
|
| 75 |
+
<div id="page-content-wrapper" class="flex-grow-1">
|
| 76 |
+
|
| 77 |
+
<!-- Green navbar -->
|
| 78 |
+
<nav class="navbar navbar-expand-lg px-3 py-2 position-relative">
|
| 79 |
+
<button class="btn btn-outline-light me-3" id="sidebarToggle">
|
| 80 |
+
<i class="bi bi-list"></i>
|
| 81 |
+
</button>
|
| 82 |
+
<span class="navbar-title-center fw-semibold">BioFuelOpt 1.0</span>
|
| 83 |
+
</nav>
|
| 84 |
+
|
| 85 |
+
<main class="container-fluid py-4">
|
| 86 |
+
{% block content %}
|
| 87 |
+
{% endblock %}
|
| 88 |
+
</main>
|
| 89 |
+
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
| 94 |
+
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
| 95 |
+
</body>
|
| 96 |
+
</html>
|
templates/constraints.html
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
{% block content %}
|
| 3 |
+
|
| 4 |
+
<div class="container py-4">
|
| 5 |
+
<h3 class="fw-bold mb-4">Fuel Property Constraints</h3>
|
| 6 |
+
|
| 7 |
+
<div class="card card-metric p-4 mb-4">
|
| 8 |
+
<h5 class="fw-bold mb-3">Design Constraints Applied in BioFuelOpt</h5>
|
| 9 |
+
|
| 10 |
+
<ul>
|
| 11 |
+
<li><strong>DCN Range:</strong> add description here</li>
|
| 12 |
+
<li><strong>YSI Threshold:</strong> add description here</li>
|
| 13 |
+
<li><strong>More properties:</strong> more description...</li>
|
| 14 |
+
|
| 15 |
+
</ul>
|
| 16 |
+
|
| 17 |
+
<p class="text-muted mt-3">
|
| 18 |
+
Can include all relevent contraints used in the model here
|
| 19 |
+
</p>
|
| 20 |
+
</div>
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
+
{% endblock %}
|
templates/dashboard.html
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
{% block content %}
|
| 3 |
+
|
| 4 |
+
<div class="container py-4">
|
| 5 |
+
|
| 6 |
+
<!-- Title -->
|
| 7 |
+
<h2 class="fw-bold mb-3">Welcome to BioFuelOpt</h2>
|
| 8 |
+
<p class="text-muted">add description here</p>
|
| 9 |
+
|
| 10 |
+
<!-- Section 1: Intro to Biofuels -->
|
| 11 |
+
<div class="card card-metric p-4 mb-4">
|
| 12 |
+
<h4 class="fw-bold mb-3">Introduction to Biofuels</h4>
|
| 13 |
+
<p>
|
| 14 |
+
Add description about biofuels here. Can also include info abt compression ignition
|
| 15 |
+
</p>
|
| 16 |
+
<p>
|
| 17 |
+
Can add images or diagrams if needed
|
| 18 |
+
</p>
|
| 19 |
+
</div>
|
| 20 |
+
|
| 21 |
+
<!-- Section 2: DCN & YSI -->
|
| 22 |
+
<div class="card card-metric p-4 mb-4">
|
| 23 |
+
<h4 class="fw-bold mb-3">Why We Focus on DCN and YSI?</h4>
|
| 24 |
+
<p>
|
| 25 |
+
Our machine learning models target two primary fuel properties:
|
| 26 |
+
</p>
|
| 27 |
+
<ul>
|
| 28 |
+
<li><strong>Derived Cetane Number (DCN)</strong> – add explanation here</li>
|
| 29 |
+
<li><strong>Yield Sooting Index (YSI)</strong> – add explanation here</li>
|
| 30 |
+
</ul>
|
| 31 |
+
<p>
|
| 32 |
+
Can add images or diagrams if needed
|
| 33 |
+
</p>
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
<!-- Section 3: How the ML App Helps -->
|
| 37 |
+
<div class="card card-metric p-4 mb-4">
|
| 38 |
+
<h4 class="fw-bold mb-3">How This ML App Helps</h4>
|
| 39 |
+
<p>
|
| 40 |
+
Explanation on how the ML app can contribute to biofuel context
|
| 41 |
+
</p>
|
| 42 |
+
<ul>
|
| 43 |
+
<li>add bullet points</li>
|
| 44 |
+
</ul>
|
| 45 |
+
</div>
|
| 46 |
+
|
| 47 |
+
<!-- Section 4: How to Use the App -->
|
| 48 |
+
<div class="card card-metric p-4 mb-4">
|
| 49 |
+
<h4 class="fw-bold mb-3">How to Use This App</h4>
|
| 50 |
+
|
| 51 |
+
<p>Follow these steps to navigate the platform effectively:</p>
|
| 52 |
+
|
| 53 |
+
<ol>
|
| 54 |
+
<li><strong>Pure Fuel Predictor:</strong>
|
| 55 |
+
Enter IUPAC names or SMILESto predict DCN & YSI of single molecules.
|
| 56 |
+
Add multiple pure fuels to get ranked results and visual comparisons.</li>
|
| 57 |
+
|
| 58 |
+
<li><strong>Mixture Fuel Predictor:</strong>
|
| 59 |
+
Provide component IUPAC names or SMILES + composition percentages of all mixture components to predict DCN & YSI values.
|
| 60 |
+
Add multiple mixture fuels to get ranked results and visual comparisons.</li>
|
| 61 |
+
|
| 62 |
+
<li><strong>Generative Molecule:</strong>
|
| 63 |
+
Input your target DCN and let the model propose a new hypothetical molecule.</li>
|
| 64 |
+
|
| 65 |
+
<li><strong>Fuel Constraint:</strong>
|
| 66 |
+
Review all design guidelines applied within optimisation and prediction steps.</li>
|
| 67 |
+
|
| 68 |
+
<li><strong>Dataset:</strong>
|
| 69 |
+
Download the pure or mixture dataset or submit new data for review (admin approval required).</li>
|
| 70 |
+
|
| 71 |
+
<li><strong>About:</strong>
|
| 72 |
+
Learn more about the research background and project contributors. Github link is included here</li>
|
| 73 |
+
</ol>
|
| 74 |
+
</div>
|
| 75 |
+
|
| 76 |
+
</div>
|
| 77 |
+
|
| 78 |
+
{% endblock %}
|
templates/dataset.html
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
{% block content %}
|
| 3 |
+
|
| 4 |
+
<div class="container py-4">
|
| 5 |
+
|
| 6 |
+
<h2 class="fw-bold mb-4">Datasets Used for Model Training & Evaluation</h2>
|
| 7 |
+
<p class="text-muted">Download the exact datasets used to train and test the cetane number prediction model.</p>
|
| 8 |
+
|
| 9 |
+
<!-- PURE DATASET -->
|
| 10 |
+
<div class="card card-metric p-4 mb-4">
|
| 11 |
+
<h4 class="fw-bold">Pure Fuel Dataset</h4>
|
| 12 |
+
<p class="text-muted">Contains all pure fuel molecules used for the pure fuel model.</p>
|
| 13 |
+
<a href="/download/pure" class="btn btn-primary mt-2">
|
| 14 |
+
⬇️ Download Pure Fuel Dataset (.xlsx)
|
| 15 |
+
</a>
|
| 16 |
+
</div>
|
| 17 |
+
|
| 18 |
+
<!-- MIXTURE DATASET -->
|
| 19 |
+
<div class="card card-metric p-4 mb-4">
|
| 20 |
+
<h4 class="fw-bold">Mixture Fuel Dataset</h4>
|
| 21 |
+
<p class="text-muted">Contains multi-component mixtures fuels used for the mixture fuel model.</p>
|
| 22 |
+
<a href="/download/mixture" class="btn btn-primary mt-2">
|
| 23 |
+
⬇️ Download Mixture Fuel Dataset (.xlsx)
|
| 24 |
+
</a>
|
| 25 |
+
</div>
|
| 26 |
+
|
| 27 |
+
</div>
|
| 28 |
+
|
| 29 |
+
{% endblock %}
|
templates/generative.html
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
{% block content %}
|
| 3 |
+
|
| 4 |
+
<div class="container py-4">
|
| 5 |
+
<h3 class="fw-bold mb-4">Generative Molecule Design</h3>
|
| 6 |
+
|
| 7 |
+
<div class="card card-metric p-4 mb-4">
|
| 8 |
+
<h5 class="fw-bold mb-3">Generate a Molecule from Target DCN</h5>
|
| 9 |
+
|
| 10 |
+
<form method="POST">
|
| 11 |
+
<div class="mb-3">
|
| 12 |
+
<label class="form-label">Target DCN</label>
|
| 13 |
+
<input type="number" step="0.1" name="target_dcn" class="form-control" placeholder="ex: 45" required>
|
| 14 |
+
</div>
|
| 15 |
+
|
| 16 |
+
<button class="btn btn-primary" type="submit">Generate Molecule</button>
|
| 17 |
+
</form>
|
| 18 |
+
</div>
|
| 19 |
+
|
| 20 |
+
{% if generated %}
|
| 21 |
+
<div class="card card-metric p-4 mb-4">
|
| 22 |
+
<h5 class="fw-bold mb-3">🔬 Generated Molecule</h5>
|
| 23 |
+
{{ generated|safe }}
|
| 24 |
+
</div>
|
| 25 |
+
{% endif %}
|
| 26 |
+
</div>
|
| 27 |
+
|
| 28 |
+
{% endblock %}
|
templates/login.html
ADDED
|
File without changes
|
templates/mixture_predictor.html
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
{% block content %}
|
| 3 |
+
|
| 4 |
+
<div class="container py-4">
|
| 5 |
+
|
| 6 |
+
<h2 class="fw-bold mb-4">Mixture Fuel Predictor</h2>
|
| 7 |
+
<p class="text-muted">add more details hhere.</p>
|
| 8 |
+
|
| 9 |
+
</div>
|
| 10 |
+
|
| 11 |
+
{% endblock %}
|
templates/pure_predictor.html
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
{% block content %}
|
| 3 |
+
|
| 4 |
+
<div class="container py-4">
|
| 5 |
+
|
| 6 |
+
<!-- Page title -->
|
| 7 |
+
<h2 class="fw-bold mb-3">Pure Fuel Cetane Number Predictor</h2>
|
| 8 |
+
<p class="text-muted">Enter one or more pure fuels using IUPAC names or SMILES to predict DCN.</p>
|
| 9 |
+
|
| 10 |
+
<!-- Input form card -->
|
| 11 |
+
<div class="card card-metric p-4 mb-4">
|
| 12 |
+
|
| 13 |
+
<h4 class="fw-bold mb-3">Input Pure Fuel Candidates</h4>
|
| 14 |
+
|
| 15 |
+
<form method="POST">
|
| 16 |
+
|
| 17 |
+
<!-- Fuel input -->
|
| 18 |
+
<div id="fuel-container">
|
| 19 |
+
|
| 20 |
+
<div class="row g-3 mb-3 fuel-row">
|
| 21 |
+
<div class="col-md-6">
|
| 22 |
+
<input type="text" name="fuel_name[]" class="form-control"
|
| 23 |
+
placeholder="Fuel IUPAC Name (ex. decane)">
|
| 24 |
+
</div>
|
| 25 |
+
|
| 26 |
+
<div class="col-md-6">
|
| 27 |
+
<input type="text" name="smiles[]" class="form-control"
|
| 28 |
+
placeholder="SMILES (ex. CCCCCCCCCC)">
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
|
| 32 |
+
</div>
|
| 33 |
+
|
| 34 |
+
<!-- Add more row -->
|
| 35 |
+
<button type="button" id="add-row" class="btn btn-primary mb-3">
|
| 36 |
+
+ Add Another Fuel
|
| 37 |
+
</button>
|
| 38 |
+
|
| 39 |
+
<br>
|
| 40 |
+
|
| 41 |
+
<!-- Submit button -->
|
| 42 |
+
<button type="submit" class="btn btn-primary px-4 mt-2">
|
| 43 |
+
Predict
|
| 44 |
+
</button>
|
| 45 |
+
|
| 46 |
+
</form>
|
| 47 |
+
</div>
|
| 48 |
+
|
| 49 |
+
<!-- Bulk CSV Upload Section -->
|
| 50 |
+
<div class="card card-metric p-4 mb-4">
|
| 51 |
+
|
| 52 |
+
<h4 class="fw-bold mb-3">Bulk Prediction (CSV Upload)</h4>
|
| 53 |
+
<p class="text-muted">Upload a CSV file with columns <strong>SMILES</strong> and <strong>IUPAC names</strong>.</p>
|
| 54 |
+
|
| 55 |
+
<form method="POST" enctype="multipart/form-data">
|
| 56 |
+
<div class="mb-3">
|
| 57 |
+
<input type="file" name="csv_file" accept=".csv" class="form-control">
|
| 58 |
+
</div>
|
| 59 |
+
|
| 60 |
+
<button type="submit" name="mode" value="csv" class="btn btn-primary">
|
| 61 |
+
Upload & Predict CSV
|
| 62 |
+
</button>
|
| 63 |
+
</form>
|
| 64 |
+
|
| 65 |
+
</div>
|
| 66 |
+
|
| 67 |
+
<!-- Results Section -->
|
| 68 |
+
{% if results %}
|
| 69 |
+
<div class="card card-metric p-4 mt-4">
|
| 70 |
+
|
| 71 |
+
<h4 class="fw-bold mb-3">Prediction Results</h4>
|
| 72 |
+
|
| 73 |
+
<table class="table table-striped table-bordered mt-3">
|
| 74 |
+
<thead>
|
| 75 |
+
<tr>
|
| 76 |
+
<th>Name</th>
|
| 77 |
+
<th>SMILES</th>
|
| 78 |
+
<th>Predicted DCN</th>
|
| 79 |
+
<th>Predicted YSI</th>
|
| 80 |
+
<th>Structure</th>
|
| 81 |
+
<th>Status</th>
|
| 82 |
+
</tr>
|
| 83 |
+
</thead>
|
| 84 |
+
|
| 85 |
+
<tbody>
|
| 86 |
+
{% for r in results %}
|
| 87 |
+
<tr>
|
| 88 |
+
<td>{{ r.name }}</td>
|
| 89 |
+
<td>{{ r.smiles }}</td>
|
| 90 |
+
<td>
|
| 91 |
+
{% if r.dcn %}<strong>{{ r.dcn }}</strong>{% else %}-{% endif %}
|
| 92 |
+
</td>
|
| 93 |
+
<td>
|
| 94 |
+
{% if r.ysi %}<strong>{{ r.ysi }}</strong>{% else %}-{% endif %}
|
| 95 |
+
</td>
|
| 96 |
+
|
| 97 |
+
<td>
|
| 98 |
+
{% if r.img_id %}
|
| 99 |
+
<img src="{{ url_for('static', filename='generated/' ~ r.img_id) }}" width="120">
|
| 100 |
+
{% else %}
|
| 101 |
+
-
|
| 102 |
+
{% endif %}
|
| 103 |
+
</td>
|
| 104 |
+
|
| 105 |
+
<td>
|
| 106 |
+
{% if r.error %}
|
| 107 |
+
<span class="text-danger">{{ r.error }}</span>
|
| 108 |
+
{% else %}
|
| 109 |
+
<span class="text-success fw-bold">OK</span>
|
| 110 |
+
{% endif %}
|
| 111 |
+
</td>
|
| 112 |
+
</tr>
|
| 113 |
+
{% endfor %}
|
| 114 |
+
</tbody>
|
| 115 |
+
|
| 116 |
+
</table>
|
| 117 |
+
|
| 118 |
+
<!-- Download CSV -->
|
| 119 |
+
<form method="POST" action="{{ url_for('download_results') }}">
|
| 120 |
+
<input type="hidden" name="results_data" value='{{ results | tojson }}'>
|
| 121 |
+
<button type="submit" class="btn btn-primary mt-3">
|
| 122 |
+
⬇️ Download Results as CSV
|
| 123 |
+
</button>
|
| 124 |
+
</form>
|
| 125 |
+
|
| 126 |
+
</div>
|
| 127 |
+
{% endif %}
|
| 128 |
+
|
| 129 |
+
</div>
|
| 130 |
+
|
| 131 |
+
<!-- JavaScript to dynamically add ONLY new rows -->
|
| 132 |
+
<script>
|
| 133 |
+
document.addEventListener("DOMContentLoaded", function () {
|
| 134 |
+
|
| 135 |
+
const container = document.getElementById("fuel-container");
|
| 136 |
+
const addRowBtn = document.getElementById("add-row");
|
| 137 |
+
|
| 138 |
+
addRowBtn.addEventListener("click", function () {
|
| 139 |
+
|
| 140 |
+
const row = document.createElement("div");
|
| 141 |
+
row.classList.add("row", "g-3", "mb-3", "fuel-row");
|
| 142 |
+
|
| 143 |
+
row.innerHTML = `
|
| 144 |
+
<div class="col-md-6">
|
| 145 |
+
<input type="text" name="fuel_name[]" class="form-control"
|
| 146 |
+
placeholder="Fuel IUPAC Name (ex. decane)">
|
| 147 |
+
</div>
|
| 148 |
+
|
| 149 |
+
<div class="col-md-6">
|
| 150 |
+
<input type="text" name="smiles[]" class="form-control"
|
| 151 |
+
placeholder="SMILES (ex. CCCCCCCCCC)">
|
| 152 |
+
</div>
|
| 153 |
+
`;
|
| 154 |
+
|
| 155 |
+
container.appendChild(row);
|
| 156 |
+
});
|
| 157 |
+
|
| 158 |
+
});
|
| 159 |
+
</script>
|
| 160 |
+
|
| 161 |
+
{% endblock %}
|
| 162 |
+
|
| 163 |
+
|