Skip to content

Commit

Permalink
Ensure semantic search is enabled before checking model download state
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye217 committed Oct 8, 2024
1 parent 74efc94 commit f4561cc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions web/src/pages/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,11 @@ export default function Explore() {
};

if (
!minilmModelState ||
!minilmTokenizerState ||
!clipImageModelState ||
!clipTextModelState
config?.semantic_search.enabled &&
(!minilmModelState ||
!minilmTokenizerState ||
!clipImageModelState ||
!clipTextModelState)
) {
return (
<ActivityIndicator className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2" />
Expand All @@ -237,7 +238,7 @@ export default function Explore() {

return (
<>
{!allModelsLoaded ? (
{config?.semantic_search.enabled && !allModelsLoaded ? (
<div className="absolute inset-0 left-1/2 top-1/2 flex h-96 w-96 -translate-x-1/2 -translate-y-1/2">
<div className="flex flex-col items-center justify-center space-y-3 rounded-lg bg-background/50 p-5">
<div className="my-5 flex flex-col items-center gap-2 text-xl">
Expand Down

0 comments on commit f4561cc

Please sign in to comment.