Browse Source

Binarize the model cause Mozilla complained

v1
Araragi 2 years ago
parent
commit
32a7715cce
  1. 3
      .eslintignore
  2. 2
      build-chrome.js
  3. 2
      build-ff.js
  4. 12
      chrome/dist/main.js
  5. 2
      chrome/manifest.json
  6. 12
      firefox/dist/main.js
  7. 2
      firefox/manifest.json
  8. 2
      firefox_update.json
  9. 3
      jkcs-0.16.xpi
  10. 4
      src/main.js
  11. 2
      src/model.json
  12. 3
      src/model.weights.bin
  13. 3
      src/weights.json

3
.eslintignore

@ -2,4 +2,5 @@ src/weights.js
JKCS.user.js
firefox/polyfill.min.js
firefox/browser-polyfill.min.js
chrome/browser-polyfill.min.js
chrome/browser-polyfill.min.js
src/csolver.weights.bin

2
build-chrome.js

@ -66,7 +66,7 @@ const manif3 = {
},
// inject: ["./esbuild.inject.js"],
plugins: [],
loader: {},
loader: { ".bin": "text" }, // Hacky solution for loading model.weights.bin but it works for now.
metafile: true,
});

2
build-ff.js

@ -66,7 +66,7 @@ const manif = {
},
// inject: ["./esbuild.inject.js"],
plugins: [],
loader: {},
loader: { ".bin": "text" },
metafile: true,
});

12
chrome/dist/main.js

File diff suppressed because one or more lines are too long

2
chrome/manifest.json

@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "JannySkillersCaptchaSolver",
"description": "The Janny Skillers Captcha Solver of choice.",
"version": "0.15",
"version": "0.16",
"icons": {
"64": "1449696017588.png"
},

12
firefox/dist/main.js

File diff suppressed because one or more lines are too long

2
firefox/manifest.json

@ -8,7 +8,7 @@
},
"name": "JannySkillersCaptchaSolver",
"description": "The Janny Skillers Captcha Solver of choice.",
"version": "0.15",
"version": "0.16",
"icons": {
"64": "1449696017588.png"
},

2
firefox_update.json

@ -1 +1 @@
{"addons":{"{4127d5ac-25a0-4453-8d51-bb2eec2ae629}":{"updates":[{"version":"0.15","update_link":"https://git.coom.tech/araragi/JKCS/raw/branch/master/JKCS-0.15.xpi"}]}}}
{"addons":{"{4127d5ac-25a0-4453-8d51-bb2eec2ae629}":{"updates":[{"version":"0.16","update_link":"https://git.coom.tech/araragi/JKCS/raw/branch/master/JKCS-0.16.xpi"}]}}}

3
jkcs-0.16.xpi

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:77dcfe17004389a5ff8d828e39e5fe832ebba4f3a153cd39a4efcc9d50ac6bed
size 9497116

4
src/main.js

@ -1,7 +1,7 @@
import * as tf from '@tensorflow/tfjs'
import modelJSON from './model.json'
import weightsJSON from './weights.json'
import charsetJSON from './charset.json'
import weightsData from './model.weights.bin'
let model
@ -28,7 +28,7 @@ const iohander = {
resolve({
modelTopology: modelJSON.modelTopology,
weightSpecs: modelJSON.weightsManifest[0].weights,
weightData: base64ToArray(weightsJSON.weights64),
weightData: base64ToArray(weightsData),
format: modelJSON.format,
generatedBy: modelJSON.generatedBy,
convertedBy: modelJSON.convertedBy

2
src/model.json

@ -200,7 +200,7 @@
},
"weightsManifest": [
{
"paths": ["group1-shard1of1.bin"],
"paths": ["model.weights.bin"],
"weights": [
{
"name": "bidi/forward_lstm/lstm_cell_4/kernel",

3
src/model.weights.bin

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5d1015787bc130ac675d7d0f0fbce71e58c2cc232f29f70b3b87b9fa70a7792e
size 12119905

3
src/weights.json

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save