Download frontend/src/components/ModelBanner.tsx from devrup404/SignalMod: direct link, hf CLI and curl.
- Browser
- Download file 921 Bytes
-
https://huggingface.co/spaces/devrup404/SignalMod/resolve/c2dca5134d67b02cdcdc22bb21994f31996a1715/frontend/src/components/ModelBanner.tsx
- Command line
-
hf download hf://spaces/devrup404/SignalMod@c2dca5134d67b02cdcdc22bb21994f31996a1715/frontend/src/components/ModelBanner.tsx
-
curl -L -o ModelBanner.tsx https://huggingface.co/spaces/devrup404/SignalMod/resolve/c2dca5134d67b02cdcdc22bb21994f31996a1715/frontend/src/components/ModelBanner.tsx
921 Bytes
| import { useEffect, useState } from "react"; | |
| import { getModelInfo } from "../api/client"; | |
| export function ModelBanner() { | |
| const [banner, setBanner] = useState<string | null>(null); | |
| useEffect(() => { | |
| getModelInfo() | |
| .then((info) => { | |
| const text = | |
| (info as { display_banner?: string }).display_banner ?? | |
| (info.name?.includes("Meta-Feature Stacking") | |
| ? "Currently using: Meta-Feature Stacking Model (F1: 0.805, Gap: 2.54%)" | |
| : null); | |
| setBanner(text); | |
| }) | |
| .catch(() => { | |
| setBanner( | |
| "Currently using: Meta-Feature Stacking Model (F1: 0.805, Gap: 2.54%)" | |
| ); | |
| }); | |
| }, []); | |
| if (!banner) return null; | |
| return ( | |
| <div className="model-banner" role="status" aria-live="polite"> | |
| <span className="model-banner-icon" aria-hidden> | |
| 🏆 | |
| </span> | |
| <span>{banner}</span> | |
| </div> | |
| ); | |
| } | |