Skip to content

Commit dac6f4b

Browse files
authored
Improve example browser extension template (#325)
Removes unnecessary complexity
1 parent 982498c commit dac6f4b

File tree

2 files changed

+0
-86
lines changed

2 files changed

+0
-86
lines changed

examples/extension/src/background.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
// background.js - Handles requests from the UI, runs the model, then sends back a response
22

33
import { pipeline, env } from '@xenova/transformers';
4-
import { CustomCache } from "./cache.js";
5-
6-
// Define caching parameters
7-
env.useBrowserCache = false;
8-
env.useCustomCache = true;
9-
env.customCache = new CustomCache('transformers-cache');
104

115
// Skip initial check for local models, since we are not loading any local models.
126
env.allowLocalModels = false;

examples/extension/src/cache.js

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)