xyplon
commited on
Update templates/models.html
Browse files- templates/models.html +20 -1
templates/models.html
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
<meta charset="UTF-8">
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
<title>Stable Diffusion Models Demo</title>
|
|
|
8 |
|
9 |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
10 |
<link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@100&display=swap" rel="stylesheet" <meta
|
@@ -273,6 +274,25 @@ color: red;
|
|
273 |
|
274 |
|
275 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
document.getElementById('prompt').addEventListener('mouseover', () => {
|
277 |
document.getElementById('prompt').placeholder = 'Enter Your Prompt';
|
278 |
});
|
@@ -288,7 +308,6 @@ document.getElementById('negative-prompt').addEventListener('input', function()
|
|
288 |
|
289 |
</script>
|
290 |
|
291 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.2/socket.io.js" integrity="sha512-8RlQJXSp6HysjW9X8D43gKjBq8cIChDhtfj4Qv5L4TJo0QCB0Mn6BD2X/QsMNdWggjmFv0HNtA13uFYQFwby8g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
292 |
|
293 |
<script src="{{ url_for('static', filename='models.js') }}"></script>
|
294 |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
|
|
5 |
<meta charset="UTF-8">
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
<title>Stable Diffusion Models Demo</title>
|
8 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.2/socket.io.js" integrity="sha512-8RlQJXSp6HysjW9X8D43gKjBq8cIChDhtfj4Qv5L4TJo0QCB0Mn6BD2X/QsMNdWggjmFv0HNtA13uFYQFwby8g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
9 |
|
10 |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
11 |
<link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@100&display=swap" rel="stylesheet" <meta
|
|
|
274 |
|
275 |
|
276 |
<script>
|
277 |
+
window.addEventListener('load', function() {
|
278 |
+
const socket = io('https://xyplon.onrender.com', {
|
279 |
+
reconnectionAttempts: 3,
|
280 |
+
timeout: 10000
|
281 |
+
});
|
282 |
+
|
283 |
+
socket.on('connect', function() {
|
284 |
+
console.log('Connected to Socket.IO server');
|
285 |
+
});
|
286 |
+
|
287 |
+
socket.on('connect_error', function(error) {
|
288 |
+
console.error('Connection error:', error);
|
289 |
+
});
|
290 |
+
|
291 |
+
socket.on('update', function(data) {
|
292 |
+
document.getElementById('stats').textContent = `Pending (Generating): ${data["Pending Requests"]} Total Requests: ${data["Total Requests"]}`;
|
293 |
+
});
|
294 |
+
});
|
295 |
+
|
296 |
document.getElementById('prompt').addEventListener('mouseover', () => {
|
297 |
document.getElementById('prompt').placeholder = 'Enter Your Prompt';
|
298 |
});
|
|
|
308 |
|
309 |
</script>
|
310 |
|
|
|
311 |
|
312 |
<script src="{{ url_for('static', filename='models.js') }}"></script>
|
313 |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|