coyotte508 commited on
Commit
da1f1b2
·
1 Parent(s): a8ea0ec
Files changed (1) hide show
  1. app.js +5 -5
app.js CHANGED
@@ -15,7 +15,7 @@ async function checkRange(n) {
15
  const path = `https://huggingface.co/celinah/xet-experiments/resolve/main/${option.value}`;
16
 
17
  const output = document.getElementById("output");
18
- output.textContent = "";
19
 
20
  const blob = new XetBlob({
21
  repo: {
@@ -33,7 +33,7 @@ async function checkRange(n) {
33
  ),
34
  ]);
35
 
36
- output.textContent += `Own: ${own.byteLength}\nBridge: ${bridge.byteLength}\n`;
37
  // Check if the first n bytes are the same
38
  const array1 = new Uint8Array(own);
39
  const array2 = new Uint8Array(bridge);
@@ -59,7 +59,7 @@ async function download() {
59
  const size = +option.getAttribute("data-size");
60
 
61
  const output = document.getElementById("output");
62
- output.textContent = "";
63
 
64
  const blob = new XetBlob({
65
  repo: {
@@ -71,7 +71,7 @@ async function download() {
71
  listener: (progress) => {
72
  output.textContent += JSON.stringify(progress) + "\n";
73
  output.textContent =
74
- output.textContent.split("\n").slice(-1000).join("\n") + "\n";
75
  },
76
  });
77
 
@@ -93,7 +93,7 @@ async function checkSha() {
93
  const size = +option.getAttribute("data-size");
94
 
95
  const output = document.getElementById("output");
96
- output.textContent = "";
97
 
98
  const blob = new XetBlob({
99
  repo: {
 
15
  const path = `https://huggingface.co/celinah/xet-experiments/resolve/main/${option.value}`;
16
 
17
  const output = document.getElementById("output");
18
+ output.textContent = "...";
19
 
20
  const blob = new XetBlob({
21
  repo: {
 
33
  ),
34
  ]);
35
 
36
+ output.textContent += `Own: ${own.byteLength.toLocaleString()}\nBridge: ${bridge.byteLength.toLocaleString()}\n`;
37
  // Check if the first n bytes are the same
38
  const array1 = new Uint8Array(own);
39
  const array2 = new Uint8Array(bridge);
 
59
  const size = +option.getAttribute("data-size");
60
 
61
  const output = document.getElementById("output");
62
+ output.textContent = "...";
63
 
64
  const blob = new XetBlob({
65
  repo: {
 
71
  listener: (progress) => {
72
  output.textContent += JSON.stringify(progress) + "\n";
73
  output.textContent =
74
+ output.textContent.split(/\n+/).slice(-1000).join("\n") + "\n";
75
  },
76
  });
77
 
 
93
  const size = +option.getAttribute("data-size");
94
 
95
  const output = document.getElementById("output");
96
+ output.textContent = "...";
97
 
98
  const blob = new XetBlob({
99
  repo: {