Spaces:
Running
Running
Upload templates/index.html with huggingface_hub
Browse files- templates/index.html +7 -7
templates/index.html
CHANGED
|
@@ -71,12 +71,12 @@
|
|
| 71 |
<div class="field">
|
| 72 |
<label for="mode">Mode</label>
|
| 73 |
<select id="mode" name="mode">
|
| 74 |
-
<option value="
|
| 75 |
-
Semantic
|
| 76 |
-
</option>
|
| 77 |
-
<option value="fts" {% if mode == "fts" %}selected{% endif %}>
|
| 78 |
Keyword
|
| 79 |
</option>
|
|
|
|
|
|
|
|
|
|
| 80 |
</select>
|
| 81 |
</div>
|
| 82 |
<div class="field">
|
|
@@ -100,7 +100,7 @@
|
|
| 100 |
<a
|
| 101 |
href="#"
|
| 102 |
class="example-link"
|
| 103 |
-
hx-get="/search-single?query={{ q | urlencode }}&mode={{ mode or '
|
| 104 |
hx-target="#results"
|
| 105 |
hx-indicator=".loading-indicator"
|
| 106 |
onclick="document.getElementById('query').value='{{ q }}'"
|
|
@@ -192,7 +192,7 @@
|
|
| 192 |
var tab = document.getElementById("tab-field").value;
|
| 193 |
var params = new URLSearchParams();
|
| 194 |
if (q) params.set("q", q);
|
| 195 |
-
if (mode !== "
|
| 196 |
if (tab !== "search") params.set("tab", tab);
|
| 197 |
if (
|
| 198 |
(tab === "search" && limit !== "10") ||
|
|
@@ -210,7 +210,7 @@
|
|
| 210 |
var q = params.get("q");
|
| 211 |
if (!q) return;
|
| 212 |
|
| 213 |
-
var mode = params.get("mode") || "
|
| 214 |
var tab = params.get("tab") || "search";
|
| 215 |
var limit = params.get("limit") || (tab === "search" ? "10" : "5");
|
| 216 |
|
|
|
|
| 71 |
<div class="field">
|
| 72 |
<label for="mode">Mode</label>
|
| 73 |
<select id="mode" name="mode">
|
| 74 |
+
<option value="fts" {% if mode != "vector" %}selected{% endif %}>
|
|
|
|
|
|
|
|
|
|
| 75 |
Keyword
|
| 76 |
</option>
|
| 77 |
+
<option value="vector" {% if mode == "vector" %}selected{% endif %}>
|
| 78 |
+
Semantic
|
| 79 |
+
</option>
|
| 80 |
</select>
|
| 81 |
</div>
|
| 82 |
<div class="field">
|
|
|
|
| 100 |
<a
|
| 101 |
href="#"
|
| 102 |
class="example-link"
|
| 103 |
+
hx-get="/search-single?query={{ q | urlencode }}&mode={{ mode or 'fts' }}&limit={{ limit or 10 }}"
|
| 104 |
hx-target="#results"
|
| 105 |
hx-indicator=".loading-indicator"
|
| 106 |
onclick="document.getElementById('query').value='{{ q }}'"
|
|
|
|
| 192 |
var tab = document.getElementById("tab-field").value;
|
| 193 |
var params = new URLSearchParams();
|
| 194 |
if (q) params.set("q", q);
|
| 195 |
+
if (mode !== "fts") params.set("mode", mode);
|
| 196 |
if (tab !== "search") params.set("tab", tab);
|
| 197 |
if (
|
| 198 |
(tab === "search" && limit !== "10") ||
|
|
|
|
| 210 |
var q = params.get("q");
|
| 211 |
if (!q) return;
|
| 212 |
|
| 213 |
+
var mode = params.get("mode") || "fts";
|
| 214 |
var tab = params.get("tab") || "search";
|
| 215 |
var limit = params.get("limit") || (tab === "search" ? "10" : "5");
|
| 216 |
|