Skip to content

Commit

Permalink
fix: fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
arash-es committed Apr 15, 2022
1 parent 14ff3f2 commit d43db69
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"preview": "vite preview"
},
"dependencies": {
"framer-motion": "^6.2.10",
"@arashes/idcard-detector": "^1.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-webcam": "^7.0.1"
Expand Down
1 change: 0 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useEffect } from 'react';
import Loading from './components/LoadingProgress/LoadingProgress';
import useLoadModel from './hooks/useLoadModel';
import Webcam from './container/Webcam';
Expand Down
6 changes: 4 additions & 2 deletions example/src/container/Webcam.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { FunctionComponent, useEffect, useRef, useState } from 'react';
import SmartCamera from '../components/SmartCamera/container/SmartCamera';
import { SmartCameraHandler } from '../components/SmartCamera/types';
import { RealtimeDetectionEngine } from '../../../dist';
import { DetectionObject } from '../../../dist/types';
import pipeline from '../utils/FP/pipeline';
import drawRect from '../helpers/drawRect';
import drawTimer from '../helpers/drawTimer';
import drawError from '../helpers/drawError';
import getCardDimensions from '../helpers/getCardDimensions';
import Loading from '../components/LoadingProgress/LoadingProgress';
import {
DetectionObject,
RealtimeDetectionEngine,
} from '@arashes/idcard-detector';

interface IProps {}

Expand Down
6 changes: 3 additions & 3 deletions example/src/hooks/useLoadModel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import { Model, loadModel as modelLoader } from '../../../.';
import { Model, loadModel as modelLoader } from '@arashes/idcard-detector';

const useLoadModel = (modelPath: string) => {
const [isLoading, setLoading] = useState(false);
Expand All @@ -22,8 +22,8 @@ const useLoadModel = (modelPath: string) => {
};

useEffect(() => {
loadModel()
}, [])
loadModel();
}, []);

return {
isLoading,
Expand Down
5 changes: 5 additions & 0 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
dependencies:
"@jridgewell/trace-mapping" "^0.3.0"

"@arashes/idcard-detector@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@arashes/idcard-detector/-/idcard-detector-1.0.0.tgz#b5ba54e4f2c9cdebada407cdd19dd9ae2493d3ef"
integrity sha512-k4ZVOoA/qUoh8HpXgg42W0WvscwY1IV4p/8fcCSCIsdXPU230bUM74QhY06ryw9JYyTMMOzeuZdU5eLuCO0Vtg==

"@babel/code-frame@^7.16.7":
version "7.16.7"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789"
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"semantic-release": "semantic-release --branches main"
},
"peerDependencies": {
"@tensorflow/tfjs": ">=3.11.0",
"@tensorflow/tfjs-converter": ">=3.11.0",
"@tensorflow/tfjs-core": ">=3.11.0"
"@tensorflow/tfjs": ">=3.15.0",
"@tensorflow/tfjs-converter": ">=3.15.0",
"@tensorflow/tfjs-core": ">=3.15.0"
},
"husky": {
"hooks": {
Expand Down Expand Up @@ -52,11 +52,13 @@
"limit": "10 KB"
}
],
"dependencies": {
"@tensorflow/tfjs": "^3.15.0",
"@tensorflow/tfjs-converter": "^3.15.0",
"@tensorflow/tfjs-core": "^3.15.0"
},
"devDependencies": {
"@size-limit/preset-small-lib": "^7.0.8",
"@tensorflow/tfjs": "^3.11.0",
"@tensorflow/tfjs-converter": "^3.11.0",
"@tensorflow/tfjs-core": "^3.11.0",
"cz-conventional-changelog": "3.3.0",
"husky": "^7.0.4",
"semantic-release": "^19.0.2",
Expand Down
1 change: 0 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export class RealtimeDetectionEngine {
}

start(onDetect: OnDetectionEvent) {
console.log(tf.getBackend());
if (this.shouldStop === false) {
return;
}
Expand Down

0 comments on commit d43db69

Please sign in to comment.