Skip to content

Commit

Permalink
added code to test local onnx model.
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianglezm committed Oct 21, 2024
1 parent c2eb5f5 commit 8c0ed86
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/store/AIStore/AI.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ import { pipeline, env } from '@huggingface/transformers';
env.userBrowserCache = true;
env.allowLocalModels = false;

//@todo remove this - new onnx local test
env.allowLocalModels = true;
env.allowRemoteModels = false;
env.localModelPath = 'http://localhost/';
//

const BACKEND = import.meta.env.VITE_APP_DOWNLOAD_URL;

export const isGPUAvailable = () => {
return navigator.gpu;
return !!navigator.gpu;
};

export class Captioner{
Expand Down

0 comments on commit 8c0ed86

Please sign in to comment.