fix: add template to code
This commit is contained in:
parent
9a94d5bbda
commit
1ce6d4c7d6
|
@ -1,6 +1,9 @@
|
|||
# Ignore everything
|
||||
*
|
||||
|
||||
# Ignore .idea
|
||||
/.idea
|
||||
|
||||
# Don't ignore directories, so we can recurse into them
|
||||
!*/
|
||||
|
||||
|
@ -22,6 +25,9 @@
|
|||
# Don't ignore Python files in src directory
|
||||
!src/**/*.py
|
||||
|
||||
# Don't ignore templates
|
||||
!templates/**/*.html
|
||||
|
||||
# Don't ignore requirements.txt in root
|
||||
!requirements.txt
|
||||
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Model Metrics</title>
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #1e1e1e;
|
||||
color: #ffffff;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
}
|
||||
h1 {
|
||||
color: #4CAF50;
|
||||
}
|
||||
select, button {
|
||||
margin: 10px 0;
|
||||
padding: 5px;
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
border: 1px solid #555;
|
||||
}
|
||||
#plot {
|
||||
width: 100%;
|
||||
height: 800px;
|
||||
}
|
||||
pre {
|
||||
background-color: #2a2a2a;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.model-select {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.model-select label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #333;
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.model-select input[type="checkbox"] {
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="POST">
|
||||
<select name="model_select" onchange="this.form.submit()">
|
||||
{% for model in model_names %}
|
||||
<option value="{{ model }}" {% if model == model_name %}selected{% endif %}>{{ model }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
|
||||
{% if plot_div %}
|
||||
{{ plot_div | safe }}
|
||||
{% else %}
|
||||
<p>No data available for the selected model.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if result %}
|
||||
<h2>Token Statistics:</h2>
|
||||
<pre>{{ result }}</pre>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue