Spaces:
Running
Running
Download src/components/ResultBlock.tsx from LiquidAI/LFM2-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 577 Bytes
-
https://huggingface.co/spaces/LiquidAI/LFM2-WebGPU/resolve/refs%2Fpr%2F2/src/components/ResultBlock.tsx
- Command line
-
hf download hf://spaces/LiquidAI/LFM2-WebGPU@refs/pr/2/src/components/ResultBlock.tsx
-
curl -L -o ResultBlock.tsx https://huggingface.co/spaces/LiquidAI/LFM2-WebGPU/resolve/refs%2Fpr%2F2/src/components/ResultBlock.tsx
577 Bytes
| import type React from "react"; | |
| const ResultBlock: React.FC<{ error?: string; result?: any }> = ({ | |
| error, | |
| result, | |
| }) => ( | |
| <div | |
| className={ | |
| error | |
| ? "bg-red-900 border border-red-600 rounded p-3" | |
| : "bg-gray-700 border border-gray-600 rounded p-3" | |
| } | |
| > | |
| {error ? <p className="text-red-300 text-sm">Error: {error}</p> : null} | |
| <pre className="text-sm text-gray-300 whitespace-pre-wrap overflow-auto mt-2"> | |
| {typeof result === "object" ? JSON.stringify(result, null, 2) : result} | |
| </pre> | |
| </div> | |
| ); | |
| export default ResultBlock; | |