Update static/demo/index.html
Browse files- static/demo/index.html +6 -6
static/demo/index.html
CHANGED
|
@@ -69,13 +69,14 @@
|
|
| 69 |
</div>
|
| 70 |
|
| 71 |
<script>
|
| 72 |
-
var
|
| 73 |
document.addEventListener('DOMContentLoaded', () => {
|
| 74 |
// Populate the different models options
|
| 75 |
// id -> id of the model on HF, name -> name displayed to the user
|
| 76 |
const models = [
|
| 77 |
-
{ id: '
|
| 78 |
-
{ id: '
|
|
|
|
| 79 |
];
|
| 80 |
const modelSelect = document.getElementById('modelSelect');
|
| 81 |
|
|
@@ -87,12 +88,11 @@
|
|
| 87 |
});
|
| 88 |
|
| 89 |
// Set default selection
|
| 90 |
-
|
| 91 |
|
| 92 |
// Record when model changes
|
| 93 |
modelSelect.addEventListener('change', function() {
|
| 94 |
-
|
| 95 |
-
modelId = selectedModel.id;
|
| 96 |
});
|
| 97 |
});
|
| 98 |
|
|
|
|
| 69 |
</div>
|
| 70 |
|
| 71 |
<script>
|
| 72 |
+
var selectedModel = '';
|
| 73 |
document.addEventListener('DOMContentLoaded', () => {
|
| 74 |
// Populate the different models options
|
| 75 |
// id -> id of the model on HF, name -> name displayed to the user
|
| 76 |
const models = [
|
| 77 |
+
{ id: 'ibm-granite/granite-3.3-8b-instruct', name: 'Granite 3.3 8B Instruct', inference_provider: 'replicate'},
|
| 78 |
+
{ id: 'mistralai/Mistral-7B-Instruct-v0.3', name: 'Mistral 7B Instruct v0.3', inference_provider: 'huggingface' },
|
| 79 |
+
{ id: 'meta-llama/Llama-4-Scout-17B-16E-Instruct', name: 'Llama 4 Scout', inference_provider: 'huggingface' },
|
| 80 |
];
|
| 81 |
const modelSelect = document.getElementById('modelSelect');
|
| 82 |
|
|
|
|
| 88 |
});
|
| 89 |
|
| 90 |
// Set default selection
|
| 91 |
+
selectedModel = models[0];
|
| 92 |
|
| 93 |
// Record when model changes
|
| 94 |
modelSelect.addEventListener('change', function() {
|
| 95 |
+
selectedModel = models.find(model => model.id === this.value);
|
|
|
|
| 96 |
});
|
| 97 |
});
|
| 98 |
|