shukdevdatta123 commited on
Commit
743a58d
·
verified ·
1 Parent(s): 8595d15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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