// src/components/validators/ModelValidator.tsx import { useEffect } from 'react'; import { Loader, CheckCircle, XCircle, ExternalLink } from 'lucide-react'; import { useHFModelValidator } from '../../hooks/useHFValidators'; export default function ModelValidator({ modelId, type, }: { modelId: string; type: 'language' | 'scorer'; }) { const { loading, result, validate } = useHFModelValidator(); useEffect(() => { validate(modelId, type); }, [modelId, type, validate]); if (!modelId?.includes('/')) return null; return (
✅ Model Verification Sucessful
Author: {result.modelInfo.author}
Download: {result.modelInfo.downloads.toLocaleString()}
{!!result.modelInfo.pipeline_tag && (Task: {result.modelInfo.pipeline_tag}
)}❌ Model Verification Failed
{result.error}
> )}