Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
|
@@ -144,8 +144,8 @@ async function pipeStreamAndReportProgress(readableStream, writableStream) {
|
|
| 144 |
if (percentage > progressBarPercent) {
|
| 145 |
progressBarPercent = percentage;
|
| 146 |
updateProgressBar(progressBarPercent);
|
| 147 |
-
const downloadedMB = (bytesCount /
|
| 148 |
-
const totalMB = (modelSize /
|
| 149 |
loaderMessage.textContent =
|
| 150 |
`Downloading model: ${downloadedMB}MB / ${totalMB}MB`;
|
| 151 |
}
|
|
|
|
| 144 |
if (percentage > progressBarPercent) {
|
| 145 |
progressBarPercent = percentage;
|
| 146 |
updateProgressBar(progressBarPercent);
|
| 147 |
+
const downloadedMB = (bytesCount / 1e6).toFixed(2);
|
| 148 |
+
const totalMB = (modelSize / 1e6).toFixed(2);
|
| 149 |
loaderMessage.textContent =
|
| 150 |
`Downloading model: ${downloadedMB}MB / ${totalMB}MB`;
|
| 151 |
}
|