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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,9 +4,10 @@ from scipy.io.wavfile import write as write_wav
4
  import tempfile
5
  import torch
6
  from numpy.core.multiarray import scalar
 
7
 
8
- # Add NumPy scalar to safe globals to fix UnpicklingError
9
- torch.serialization.add_safe_globals([scalar])
10
 
11
  # Preload the models at startup
12
  preload_models()
 
4
  import tempfile
5
  import torch
6
  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
13
  preload_models()