Spaces:
Runtime error
Runtime error
Update index page
Browse files- templates/index.html +48 -16
templates/index.html
CHANGED
|
@@ -1,24 +1,56 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Welcome Page</title>
|
| 7 |
<!-- Bootstrap CSS -->
|
| 8 |
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
|
|
|
|
| 9 |
</head>
|
|
|
|
| 10 |
<body>
|
| 11 |
-
<
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
</div>
|
| 17 |
-
|
| 18 |
<!-- Optional JavaScript; choose one of the two! -->
|
| 19 |
|
| 20 |
<!-- Option 1: Bootstrap Bundle with Popper -->
|
| 21 |
-
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
|
|
|
|
|
|
| 22 |
|
| 23 |
<!-- Option 2: Separate Popper and Bootstrap JS -->
|
| 24 |
<!--
|
|
@@ -27,20 +59,20 @@
|
|
| 27 |
-->
|
| 28 |
</body>
|
| 29 |
<script>
|
| 30 |
-
document.querySelector('.btn-primary').addEventListener('click', function() {
|
| 31 |
fetch('/run-script/', {
|
| 32 |
method: 'POST',
|
| 33 |
headers: {
|
| 34 |
'Content-Type': 'application/json'
|
| 35 |
}
|
| 36 |
})
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
});
|
| 45 |
</script>
|
| 46 |
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
<title>Welcome Page</title>
|
| 8 |
<!-- Bootstrap CSS -->
|
| 9 |
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
|
| 10 |
+
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
| 11 |
</head>
|
| 12 |
+
|
| 13 |
<body>
|
| 14 |
+
<div class="modal modal-tour position-static d-block bg-secondary py-5" tabindex="-1" role="dialog" id="modalTour">
|
| 15 |
+
<div class="modal-dialog" role="document">
|
| 16 |
+
<div class="modal-content rounded-4 shadow">
|
| 17 |
+
<div class="modal-body p-5">
|
| 18 |
+
<h2 class="fw-bold mb-0">What's new {{ name }}</h2>
|
| 19 |
+
<ul class="d-grid gap-4 my-5 list-unstyled">
|
| 20 |
+
<li class="d-flex gap-4">
|
| 21 |
+
<img src="/static/img/robotface2.jpg" alt="Image description" width="52" height="52">
|
| 22 |
+
|
| 23 |
+
<div>
|
| 24 |
+
<h5 class="mb-0">
|
| 25 |
+
Step 1
|
| 26 |
+
</h5>
|
| 27 |
+
Push the button to generate the ....
|
| 28 |
+
</div>
|
| 29 |
+
</li>
|
| 30 |
+
<li class="d-flex gap-4">
|
| 31 |
+
<img src="/static/img/robotface.jpg" alt="Image description" width="52" height="52">
|
| 32 |
+
|
| 33 |
+
<div>
|
| 34 |
+
<h5 class="mb-0">
|
| 35 |
+
Step 2
|
| 36 |
+
</h5>
|
| 37 |
+
Make api to get answer
|
| 38 |
+
</div>
|
| 39 |
+
</li>
|
| 40 |
+
</ul>
|
| 41 |
+
<button type="button" class="btn btn-lg btn-primary mt-5 w-100" data-bs-dismiss="modal">
|
| 42 |
+
Genrate Faiss
|
| 43 |
+
</button>
|
| 44 |
+
</div>
|
| 45 |
+
</div>
|
| 46 |
+
</div>
|
| 47 |
</div>
|
|
|
|
| 48 |
<!-- Optional JavaScript; choose one of the two! -->
|
| 49 |
|
| 50 |
<!-- Option 1: Bootstrap Bundle with Popper -->
|
| 51 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
| 52 |
+
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
|
| 53 |
+
crossorigin="anonymous"></script>
|
| 54 |
|
| 55 |
<!-- Option 2: Separate Popper and Bootstrap JS -->
|
| 56 |
<!--
|
|
|
|
| 59 |
-->
|
| 60 |
</body>
|
| 61 |
<script>
|
| 62 |
+
document.querySelector('.btn-primary').addEventListener('click', function () {
|
| 63 |
fetch('/run-script/', {
|
| 64 |
method: 'POST',
|
| 65 |
headers: {
|
| 66 |
'Content-Type': 'application/json'
|
| 67 |
}
|
| 68 |
})
|
| 69 |
+
.then(response => response.json())
|
| 70 |
+
.then(data => {
|
| 71 |
+
console.log(data); // Log the response from the server
|
| 72 |
+
})
|
| 73 |
+
.catch(error => {
|
| 74 |
+
console.error('Error:', error);
|
| 75 |
+
});
|
| 76 |
});
|
| 77 |
</script>
|
| 78 |
|