Spaces:
Paused
Paused
Download src/context/useVLMContext.ts from aiqtech/fastvlm-webgpu: direct link, hf CLI and curl.
- Browser
- Download file 311 Bytes
-
https://huggingface.co/spaces/aiqtech/fastvlm-webgpu/resolve/main/src/context/useVLMContext.ts
- Command line
-
hf download hf://spaces/aiqtech/fastvlm-webgpu/src/context/useVLMContext.ts
-
curl -L -o useVLMContext.ts https://huggingface.co/spaces/aiqtech/fastvlm-webgpu/resolve/main/src/context/useVLMContext.ts
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; | |
| } | |