diff --git a/packages/tasks/src/model-libraries-snippets.ts b/packages/tasks/src/model-libraries-snippets.ts index f9c096095..3247f2e2d 100644 --- a/packages/tasks/src/model-libraries-snippets.ts +++ b/packages/tasks/src/model-libraries-snippets.ts @@ -891,6 +891,15 @@ wavs = chat.infer(texts, ) torchaudio.save("output1.wav", torch.from_numpy(wavs[0]), 24000)`, ]; +export const yolov10 = (model: ModelData): string[] => [ + `from ultralytics import YOLOv10 + +model = YOLOv10.from_pretrained("${model.id}") +source = 'http://images.cocodataset.org/val2017/000000039769.jpg' +model.predict(source=source, save=True) +`, +]; + export const birefnet = (model: ModelData): string[] => [ `# Option 1: use with transformers diff --git a/packages/tasks/src/model-libraries.ts b/packages/tasks/src/model-libraries.ts index 55bf8d09c..2c163e3de 100644 --- a/packages/tasks/src/model-libraries.ts +++ b/packages/tasks/src/model-libraries.ts @@ -657,6 +657,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { docsUrl: "https://github.com/jasonppy/VoiceCraft", snippets: snippets.voicecraft, }, + yolov10: { + prettyLabel: "YOLOv10", + repoName: "yolov10", + repoUrl: "https://github.com/THU-MIG/yolov10", + docsUrl: "https://github.com/THU-MIG/yolov10", + snippets: snippets.yolov10, + }, whisperkit: { prettyLabel: "WhisperKit", repoName: "WhisperKit",