Skip to content

Commit 2f460be

Browse files
committed
docs: fix example
1 parent a60c98d commit 2f460be

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/docs/03-hooks/02-computer-vision/useImageSegmentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
} from 'react-native-executorch';
2323

2424
const model = useImageSegmentation({
25-
model: { modelName: 'deeplab-v3', modelSource: DEEPLAB_V3_RESNET50 },
25+
model: DEEPLAB_V3_RESNET50,
2626
});
2727

2828
const imageUri = 'file::///Users/.../cute_cat.png';
@@ -92,7 +92,7 @@ import {
9292

9393
function App() {
9494
const model = useImageSegmentation({
95-
model: { modelName: 'deeplab-v3', modelSource: DEEPLAB_V3_RESNET50 },
95+
model: DEEPLAB_V3_RESNET50,
9696
});
9797

9898
const handleSegment = async () => {

docs/docs/04-typescript-api/02-computer-vision/ImageSegmentationModule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Use [`fromModelName`](../../06-api-reference/classes/ImageSegmentationModule.md#
4444

4545
```typescript
4646
const segmentation = await ImageSegmentationModule.fromModelName(
47-
{ modelName: 'deeplab-v3', modelSource: DEEPLAB_V3_RESNET50 },
47+
DEEPLAB_V3_RESNET50,
4848
(progress) => console.log(`Download: ${Math.round(progress * 100)}%`)
4949
);
5050
```

0 commit comments

Comments
 (0)