Skip to content

Commit

Permalink
🚚 update: Add NPM package to example
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshKapadia2 committed Nov 11, 2021
1 parent 5706a29 commit 3444665
Show file tree
Hide file tree
Showing 5 changed files with 254 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NanoNets OCR SDK Example

A sample web app that uses the [NanoNets](https://nanonets.com) Optical Character Recognition Node.js SDK.
A sample web app that uses the [NanoNets Optical Character Recognition Node.js SDK](https://www.npmjs.com/package/@nanonets/optical-character-recognition).

## Usage Instructions

Expand Down
10 changes: 5 additions & 5 deletions example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from "path";
import { fileURLToPath } from "url";
import express from "express";
import multer from "multer";
import OpticalCharacterRecognition from "../index.js";
import OpticalCharacterRecognition from "@nanonets/optical-character-recognition";
import dotenv from "dotenv";

// Server initialization
Expand All @@ -22,10 +22,10 @@ app.use(express.urlencoded({ extended: false }));
app.use(express.json());

// Class instantiation
// const ocr = new OpticalCharacterRecognition(
// process.env.API_KEY_1,
// process.env.MODEL_ID_1
// );
const ocr = new OpticalCharacterRecognition(
process.env.API_KEY_1,
process.env.MODEL_ID_1
);

// Routes
app.get("/", async (req, res) => {
Expand Down
Loading

0 comments on commit 3444665

Please sign in to comment.