mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Ensure we get model state on initial page load
This commit is contained in:
parent
5e493da859
commit
673394d9a1
@ -2,6 +2,7 @@ import {
|
|||||||
useEmbeddingsReindexProgress,
|
useEmbeddingsReindexProgress,
|
||||||
useEventUpdate,
|
useEventUpdate,
|
||||||
useModelState,
|
useModelState,
|
||||||
|
useWs,
|
||||||
} from "@/api/ws";
|
} from "@/api/ws";
|
||||||
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
||||||
import AnimatedCircularProgressBar from "@/components/ui/circular-progress-bar";
|
import AnimatedCircularProgressBar from "@/components/ui/circular-progress-bar";
|
||||||
@ -202,6 +203,14 @@ export default function Explore() {
|
|||||||
|
|
||||||
// model states
|
// model states
|
||||||
|
|
||||||
|
const { send: sendCommand } = useWs("model_state", "modelState");
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
sendCommand("modelState");
|
||||||
|
// only run on mount
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, []);
|
||||||
|
|
||||||
const { payload: textModelState } = useModelState(
|
const { payload: textModelState } = useModelState(
|
||||||
"jinaai/jina-clip-v1-text_model_fp16.onnx",
|
"jinaai/jina-clip-v1-text_model_fp16.onnx",
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user