fastvlm-webgpu / src /context /useVLMContext.ts
Xenova's picture
Xenova HF Staff
Upload 32 files
f581cc4 verified
raw
history blame contribute delete
311 Bytes
import { useContext } from "react";
import { VLMContext } from "./VLMContext";
import type { VLMContextValue } from "../types/vlm";
export function useVLMContext(): VLMContextValue {
const ctx = useContext(VLMContext);
if (!ctx) throw new Error("useVLMContext must be inside VLMProvider");
return ctx;
}