@verihubs-api/reactfr

Verihubs-FR is a React library for predicting similiarities between 2 images.

Usage no npm install needed!

<script type="module">
  import verihubsApiReactfr from 'https://cdn.skypack.dev/@verihubs-api/reactfr';
</script>

README

Verihubs-FR

Verihubs-FR is a React library for predicting similiarities between 2 images.

Installation

Use the package manager npm to install Verihubs-FR.

npm install @verihubs-api/reactfr

Usage

import { loadModels, predictSimiliarity } from '@verihubs-api/reactfr';

componentDidMount = async () => {
    await loadModels();
    await this.handleImage(this.state.imageURL1, this.state.imageURL2);
  };

  handleImage = async (image1 = this.state.imageURL1, image2 = this.state.imageURL2) => {
    await predictSimiliarity(image1, image2).then(jsonDistance => {
      this.setState({ result : jsonDistance });
    });
  };

License

MIT