Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -444,15 +444,24 @@ def main():
|
|
444 |
|
445 |
gr.HTML("""
|
446 |
<head>
|
447 |
-
<link rel="manifest" href="manifest.json">
|
448 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
449 |
<meta name="theme-color" content="#4299e1">
|
450 |
-
<
|
|
|
|
|
|
|
451 |
</head>
|
452 |
<script>
|
453 |
if ('serviceWorker' in navigator) {
|
454 |
window.addEventListener('load', () => {
|
455 |
-
navigator.serviceWorker.register('/service-worker.js')
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
});
|
457 |
}
|
458 |
</script>
|
@@ -535,4 +544,4 @@ def main():
|
|
535 |
|
536 |
if __name__ == "__main__":
|
537 |
iface = main()
|
538 |
-
iface.launch()
|
|
|
444 |
|
445 |
gr.HTML("""
|
446 |
<head>
|
447 |
+
<link rel="manifest" href="/manifest.json">
|
448 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
449 |
<meta name="theme-color" content="#4299e1">
|
450 |
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
451 |
+
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
452 |
+
<meta name="apple-mobile-web-app-title" content="PawMatch">
|
453 |
+
<link rel="apple-touch-icon" href="/assets/icon-192.png">
|
454 |
</head>
|
455 |
<script>
|
456 |
if ('serviceWorker' in navigator) {
|
457 |
window.addEventListener('load', () => {
|
458 |
+
navigator.serviceWorker.register('/service-worker.js')
|
459 |
+
.then((registration) => {
|
460 |
+
console.log('ServiceWorker registration successful');
|
461 |
+
})
|
462 |
+
.catch((err) => {
|
463 |
+
console.log('ServiceWorker registration failed: ', err);
|
464 |
+
});
|
465 |
});
|
466 |
}
|
467 |
</script>
|
|
|
544 |
|
545 |
if __name__ == "__main__":
|
546 |
iface = main()
|
547 |
+
iface.launch()
|