Skip to content

Commit

Permalink
Readme: Reflect new way to download the models for self-hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
mirko314 committed Jun 12, 2024
1 parent 0d247b3 commit 072ec5d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,11 @@ The performance is largely dependent on the feature set available. Most prominen

### Custom Asset Serving

The wasm and onnx neural networks are hosted by IMG.LY by default. For production use, we advise you to host them yourself. Therefore, copy all .wasm and .onnx files to your public path `$PUBLIC_PATH` and reconfigure the library.
The wasm and onnx neural networks are hosted by IMG.LY by default. For production use, we advise you to host them yourself:

```shell
npm i @imgly/background-removal-data
cp node_modules/@imgly/background-removal-data/dist/* $PUBLIC_PATH
```
- Download the following package with the package version that matches your `@imgly/background-removal` version from the IMG.LY CDN and decompress it. Note that you need to replace `YOUR_PACKAGE_VERSION` with the actual version of the package you are using. The URL is
`https://staticimgly.com/@imgly/background-removal-data/YOUR_PACKAGE_VERSION/package.tgz`.
- Move the content of the `package/dist` folder to be served by your web server. This often is the `/public` folder.

```typescript
import imglyRemoveBackground, {Config} from "@imgly/background-removal"
Expand Down

0 comments on commit 072ec5d

Please sign in to comment.