Object Detection
ultralytics
English
agriculture
weed-detection
yolo
yolov8
yolo26
precision-agriculture
research
Instructions to use Rmano-Rudeson/weedscan-kz with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use Rmano-Rudeson/weedscan-kz with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("Rmano-Rudeson/weedscan-kz", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Download web/src/components/StatCard.tsx from Rmano-Rudeson/weedscan-kz: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/Rmano-Rudeson/weedscan-kz/resolve/main/web/src/components/StatCard.tsx
- Command line
-
hf download hf://Rmano-Rudeson/weedscan-kz/web/src/components/StatCard.tsx
-
curl -L -o StatCard.tsx https://huggingface.co/Rmano-Rudeson/weedscan-kz/resolve/main/web/src/components/StatCard.tsx
1.44 kB
| import { motion } from "framer-motion"; | |
| import { LucideIcon } from "lucide-react"; | |
| interface StatCardProps { | |
| icon: LucideIcon; | |
| label: string; | |
| value: string | number; | |
| sub?: string; | |
| variant?: "default" | "success" | "warning" | "destructive"; | |
| } | |
| const variantStyles = { | |
| default: "bg-card shadow-card", | |
| success: "bg-success/10 border-success/20", | |
| warning: "bg-warning/10 border-warning/20", | |
| destructive: "bg-destructive/10 border-destructive/20", | |
| }; | |
| const iconStyles = { | |
| default: "bg-primary/10 text-primary", | |
| success: "bg-success/15 text-success", | |
| warning: "bg-warning/15 text-warning", | |
| destructive: "bg-destructive/15 text-destructive", | |
| }; | |
| const StatCard = ({ icon: Icon, label, value, sub, variant = "default" }: StatCardProps) => ( | |
| <motion.div | |
| initial={{ opacity: 0, y: 16 }} | |
| animate={{ opacity: 1, y: 0 }} | |
| className={`rounded-xl border p-5 ${variantStyles[variant]}`} | |
| > | |
| <div className="flex items-start justify-between"> | |
| <div> | |
| <p className="text-sm font-medium text-muted-foreground">{label}</p> | |
| <p className="mt-1.5 text-2xl font-bold text-foreground">{value}</p> | |
| {sub && <p className="mt-0.5 text-xs text-muted-foreground">{sub}</p>} | |
| </div> | |
| <div className={`flex h-10 w-10 items-center justify-center rounded-lg ${iconStyles[variant]}`}> | |
| <Icon className="h-5 w-5" /> | |
| </div> | |
| </div> | |
| </motion.div> | |
| ); | |
| export default StatCard; | |