Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
|
@@ -201,7 +201,7 @@ async function loadLlmNonChromium() {
|
|
| 201 |
async function loadLlm() {
|
| 202 |
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
| 203 |
const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
| 204 |
-
|
| 205 |
|
| 206 |
let opfs = await navigator.storage.getDirectory();
|
| 207 |
// If we can load the model from cache, then do so.
|
|
|
|
| 201 |
async function loadLlm() {
|
| 202 |
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
| 203 |
const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
| 204 |
+
if (isSafari || isFirefox) return loadLlmNonChromium();
|
| 205 |
|
| 206 |
let opfs = await navigator.storage.getDirectory();
|
| 207 |
// If we can load the model from cache, then do so.
|