Update index.html
Browse files- index.html +4 -2
index.html
CHANGED
|
@@ -36,6 +36,8 @@
|
|
| 36 |
<script>
|
| 37 |
let apiKey = '';
|
| 38 |
let apiUrl = '';
|
|
|
|
|
|
|
| 39 |
|
| 40 |
////////////////////////////////////////////////
|
| 41 |
// Populate the model list on api key change
|
|
@@ -94,7 +96,7 @@
|
|
| 94 |
document.getElementById("embed-form").addEventListener("submit", function(event) {
|
| 95 |
event.preventDefault();
|
| 96 |
const text = document.getElementById("embed-input").value;
|
| 97 |
-
fetch("
|
| 98 |
method: "GET",
|
| 99 |
headers: {
|
| 100 |
"Content-Type": "application/json"
|
|
@@ -111,7 +113,7 @@
|
|
| 111 |
event.preventDefault();
|
| 112 |
const text = document.getElementById("search-input").value;
|
| 113 |
const n = document.getElementById("n-input").value;
|
| 114 |
-
fetch("
|
| 115 |
method: "GET",
|
| 116 |
headers: {
|
| 117 |
"Content-Type": "application/json"
|
|
|
|
| 36 |
<script>
|
| 37 |
let apiKey = '';
|
| 38 |
let apiUrl = '';
|
| 39 |
+
|
| 40 |
+
const hfApiUrl = 'https://almaatla-fastapi.hf.space/';
|
| 41 |
|
| 42 |
////////////////////////////////////////////////
|
| 43 |
// Populate the model list on api key change
|
|
|
|
| 96 |
document.getElementById("embed-form").addEventListener("submit", function(event) {
|
| 97 |
event.preventDefault();
|
| 98 |
const text = document.getElementById("embed-input").value;
|
| 99 |
+
fetch(hfApiUrl + "embed", {
|
| 100 |
method: "GET",
|
| 101 |
headers: {
|
| 102 |
"Content-Type": "application/json"
|
|
|
|
| 113 |
event.preventDefault();
|
| 114 |
const text = document.getElementById("search-input").value;
|
| 115 |
const n = document.getElementById("n-input").value;
|
| 116 |
+
fetch(hfApiUrl + "search", {
|
| 117 |
method: "GET",
|
| 118 |
headers: {
|
| 119 |
"Content-Type": "application/json"
|