Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import shutil
|
| 3 |
import tempfile
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from torch.serialization import add_safe_globals
|
| 3 |
+
import numpy.core.multiarray
|
| 4 |
+
|
| 5 |
+
# Patch for PyTorch 2.6 to allow loading Bark's model checkpoints
|
| 6 |
+
add_safe_globals({
|
| 7 |
+
'scalar': numpy.core.multiarray.scalar
|
| 8 |
+
})
|
| 9 |
+
|
| 10 |
+
|
| 11 |
import os
|
| 12 |
import shutil
|
| 13 |
import tempfile
|