Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ from numpy.core.multiarray import scalar
|
|
7 |
import numpy
|
8 |
|
9 |
# Add NumPy scalar and dtype to safe globals to fix UnpicklingError
|
|
|
10 |
torch.serialization.add_safe_globals([scalar, numpy.dtype])
|
11 |
|
12 |
# Preload the models at startup
|
|
|
7 |
import numpy
|
8 |
|
9 |
# Add NumPy scalar and dtype to safe globals to fix UnpicklingError
|
10 |
+
# This allowlists numpy.dtype to cover specific instances like numpy.dtype[float64]
|
11 |
torch.serialization.add_safe_globals([scalar, numpy.dtype])
|
12 |
|
13 |
# Preload the models at startup
|