bugfixes
| @@ -2276,7 +2276,7 @@ | ||
| 2276 | 2276 | </select> |
| 2277 | 2277 | <select id="category_selection"> |
| 2278 | 2278 | <option value="" disabled selected data-i18n="category">category</option> |
| 2279 | 2279 | <!-- <option value="Favorite" data-i18n="Top">Favorite</option> --> |
| 2280 | 2280 | <option value="Top" data-i18n="Top">Top</option> |
| 2281 | 2281 | <option value="New" data-i18n="New">New</option> |
| 2282 | 2282 | <option value="All" data-i18n="All">All</option> |
| @@ -2291,11 +2291,11 @@ | ||
| 2291 | 2291 | |
| 2292 | 2292 | </div> |
| 2293 | 2293 | </div> |
| 2294 | 2294 | <!-- <select id="featherless_model"> |
| 2295 | 2295 | <option value="" data-i18n="-- Connect to the API --"> |
| 2296 | 2296 | -- Connect to the API -- |
| 2297 | 2297 | </option> |
| 2298 | 2298 | </select> --> |
| 2299 | 2299 | </div> |
| 2300 | 2300 | <div data-tg-type="vllm"> |
| 2301 | 2301 | <div class="flex-container flexFlowColumn"> |
| @@ -412,11 +412,16 @@ export async function loadFeatherlessModels(data) { | ||
| 412 | 412 | const selectedSortOrder = sortOrderSelect.value; |
| 413 | 413 | const selectedClass = classSelect.value; |
| 414 | 414 | const selectedCategory = categoriesSelect.value; |
| 415 | + let featherlessTop = []; | |
| 416 | + let featherlessNew = []; | |
| 415 | 417 | |
| 416 | - const featherlessTop = await fetchFeatherlessStats(); | |
| 418 | + if (selectedCategory === 'Top') { | |
| 419 | + featherlessTop = await fetchFeatherlessStats(); | |
| 420 | + } | |
| 417 | 421 | const featherlessIds = featherlessTop.map(stat => stat.id); |
| 418 | - | |
| 422 | + if(selectedCategory === 'New') { | |
| 419 | 423 | const featherlessNew = await fetchFeatherlessNew(); |
| 424 | + } | |
| 420 | 425 | const featherlessNewIds = featherlessNew.map(stat => stat.id); |
| 421 | 426 | |
| 422 | 427 | let filteredModels = originalModels.filter(model => { |
| @@ -435,7 +440,7 @@ export async function loadFeatherlessModels(data) { | ||
| 435 | 440 | return matchesSearch && matchesClass && matchesNew; |
| 436 | 441 | } |
| 437 | 442 | else { |
| 438 | 443 | return nullmatchesSearch; |
| 439 | 444 | } |
| 440 | 445 | }); |
| 441 | 446 | |