Spaces:
Sleeping
Sleeping
File size: 3,192 Bytes
bc46226 9b40395 815a086 9b40395 815a086 f394041 9b40395 815a086 9b40395 bc46226 6930d8f bc46226 6930d8f bc46226 |
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 |
<!DOCTYPE html>
<html>
<head>
<title>IPM Comparison</title>
<style>
body {
font-family: 'Segoe UI', sans-serif;
background: #f7f9fc;
text-align: center;
padding: 30px;
}
h2 {
color: #1e88e5;
}
select {
padding: 10px;
margin: 20px;
border-radius: 6px;
border: 1px solid #aaa;
font-size: 16px;
}
img {
max-width: 90%;
border: 1px solid #ddd;
border-radius: 8px;
margin-top: 20px;
}
a {
display: inline-block;
background-color: #43a047;
color: white;
padding: 10px 20px;
text-decoration: none;
border-radius: 6px;
margin-top: 15px;
transition: background 0.3s ease;
}
a:hover {
background-color: #2e7d32;
}
button {
background-color: #e53935;
color: white;
border: none;
padding: 10px 20px;
border-radius: 6px;
margin-top: 20px;
cursor: pointer;
}
button:hover {
background-color: #c62828;
}
</style>
<script>
function showPlot() {
const col = document.getElementById("col-select").value;
document.getElementById("plot-img").src = "/plot_image/" + encodeURIComponent(col);
}
</script>
</head>
<body>
<h2>📊 IPM Correlation</h2>
{% if file_ready %}
<a href="/download_comparison">⬇️ Download Comparison Excel</a>
{% endif %}
<h3>Select Parameter to Plot:</h3>
<select id="col-select" onchange="showPlot()">
<option disabled selected>Select a column</option>
{% for c in cols %}
<option value="{{ c }}">{{ c }}</option>
{% endfor %}
</select>
<br>
<img id="plot-img" src="" alt="Plot will appear here">
<br>
<form action="/reset_golden">
<button>Reset Golden Data</button>
</form>
</body>
</html>
<!-- New Code -->
<!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Plot Comparison</title>
<style>
.plot-container {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-top: 20px;
}
.plot-item {
border: 1px solid #ccc;
padding: 10px;
box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
img {
max-width: 100%;
height: auto;
display: block;
}
</style>
</head>
<body>
<h1>Comparison Results</h1>
<p>
<a href="{{ url_for('download_comparison') }}">Download Comparison Excel</a> |
<a href="{{ url_for('reset_golden') }}">Start New Comparison</a>
</p>
<h2>Individual Parameter Plots (Golden vs Test 1 vs Test 2)</h2>
{% if file_ready %}
<div class="plot-container">
{% for col in cols %}
<div class="plot-item">
<h3>{{ col }}</h3>
<img src="{{ url_for('plot_image', col=col) }}" alt="Plot for {{ col }}">
</div>
{% endfor %}
</div>
{% else %}
<p>Comparison is not ready. Please go back to the <a href="{{ url_for('index') }}">homepage</a> to upload files.</p>
{% endif %}
</body>
</html> --> |