CoolFace
Apppublic

dilums/object-detection

sourceHugging Facemitupdated 3y agoView on Hugging Face
0likes
ModelSelector.tsx60 linesDownload Raw Back to ModelSelector
1"use client";2import {3  Select,4  SelectContent,5  SelectGroup,6  SelectItem,7  SelectTrigger,8  SelectValue,9} from "@/components/ui/select";10import useStore from "@/store";11 12type CompProps = {};13export default function ModelSelector({}: CompProps) {14  return (15    <div className="flex items-center  px-4 py-2 justify-between">16      <div className="inline-flex items-center space-x-2">17        <div className="font-bold"> Model : </div>18        <SelectModel />19      </div>20    </div>21  );22}23 24const options = [25  "facebook/detr-resnet-50",26  "hustvl/yolos-tiny",27  "facebook/detr-resnet-101",28  "hustvl/yolos-small",29  "valentinafeve/yolos-fashionpedia",30  "keremberke/yolov5m-license-plate",31  "facebook/detr-resnet-101-dc5",32  "nickmuchi/yolos-small-finetuned-license-plate-detection",33  "microsoft/table-transformer-structure-recognition",34  "TahaDouaji/detr-doc-table-detection",35  "hustvl/yolos-base",36  "biglam/detr-resnet-50_fine_tuned_nls_chapbooks",37];38function SelectModel() {39  const { model, setModel } = useStore((state) => ({40    model: state.model,41    setModel: state.setModel,42  }));43  return (44    <Select value={model} onValueChange={setModel}>45      <SelectTrigger className="w-[500px]">46        <SelectValue placeholder="Select a fruit" />47      </SelectTrigger>48      <SelectContent className="w-full">49        <SelectGroup>50          {options.map((i) => (51            <SelectItem value={i} key={i}>52              {i}53            </SelectItem>54          ))}55        </SelectGroup>56      </SelectContent>57    </Select>58  );59}60