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/ui/toggle-group.tsx from Rmano-Rudeson/weedscan-kz: direct link, hf CLI and curl.
- Browser
- Download file 1.71 kB
-
https://huggingface.co/Rmano-Rudeson/weedscan-kz/resolve/main/web/src/components/ui/toggle-group.tsx
- Command line
-
hf download hf://Rmano-Rudeson/weedscan-kz/web/src/components/ui/toggle-group.tsx
-
curl -L -o toggle-group.tsx https://huggingface.co/Rmano-Rudeson/weedscan-kz/resolve/main/web/src/components/ui/toggle-group.tsx
1.71 kB
| import * as React from "react"; | |
| import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"; | |
| import { type VariantProps } from "class-variance-authority"; | |
| import { cn } from "@/lib/utils"; | |
| import { toggleVariants } from "@/components/ui/toggle"; | |
| const ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariants>>({ | |
| size: "default", | |
| variant: "default", | |
| }); | |
| const ToggleGroup = React.forwardRef< | |
| React.ElementRef<typeof ToggleGroupPrimitive.Root>, | |
| React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> | |
| >(({ className, variant, size, children, ...props }, ref) => ( | |
| <ToggleGroupPrimitive.Root ref={ref} className={cn("flex items-center justify-center gap-1", className)} {...props}> | |
| <ToggleGroupContext.Provider value={{ variant, size }}>{children}</ToggleGroupContext.Provider> | |
| </ToggleGroupPrimitive.Root> | |
| )); | |
| ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName; | |
| const ToggleGroupItem = React.forwardRef< | |
| React.ElementRef<typeof ToggleGroupPrimitive.Item>, | |
| React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants> | |
| >(({ className, children, variant, size, ...props }, ref) => { | |
| const context = React.useContext(ToggleGroupContext); | |
| return ( | |
| <ToggleGroupPrimitive.Item | |
| ref={ref} | |
| className={cn( | |
| toggleVariants({ | |
| variant: context.variant || variant, | |
| size: context.size || size, | |
| }), | |
| className, | |
| )} | |
| {...props} | |
| > | |
| {children} | |
| </ToggleGroupPrimitive.Item> | |
| ); | |
| }); | |
| ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName; | |
| export { ToggleGroup, ToggleGroupItem }; | |