1.0.24 • Published 2 months ago

landingai-react v1.0.24

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

landingai-react

React components to fetch and render predictions from an image.

Usage

import React from 'react';
import { useState } from "react";
import { InferenceContext, InferenceResult, PhotoCollector } from "landingai-react";

const apiInfo = {
  endpoint: `https://predict.app.landing.ai/inference/v1/predict?endpoint_id=<endpoint_id>`,
  key: "<api_key>",
  secret: "<api_secret>",
};

export default function App() {
  const [image, setImage] = useState<Blob>();

  return (
    <InferenceContext.Provider value={apiInfo}>
      <PhotoCollector setImage={setImage} />
      <InferenceResult image={image} />
    </InferenceContext.Provider>
  );
}

References

Examples

1.0.24

2 months ago

1.0.23

8 months ago

1.0.22

10 months ago

1.0.21

11 months ago

1.0.20

11 months ago

1.0.19

11 months ago

1.0.18

11 months ago

1.0.14

11 months ago

1.0.12

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago