Spaces:
Build error
Build error
Create sw.js
Browse files
sw.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
self.addEventListener('install', event => {
|
2 |
+
event.waitUntil(
|
3 |
+
caches.open('meroni').then(cache => {
|
4 |
+
return cache.addAll([
|
5 |
+
'/models/tinyllama-1.1b-chat-v1.0.Q2_K.gguf'
|
6 |
+
]);
|
7 |
+
})
|
8 |
+
);
|
9 |
+
});
|
10 |
+
|
11 |
+
self.addEventListener('fetch', event => {
|
12 |
+
event.respondWith(
|
13 |
+
caches.match(event.request).then(response => {
|
14 |
+
return response || fetch(event.request);
|
15 |
+
})
|
16 |
+
);
|
17 |
+
});
|