Spaces:
Configuration error
Configuration error
Kangarroar
commited on
Commit
•
642e2a7
1
Parent(s):
ca38009
Update app.py
Browse files
app.py
CHANGED
@@ -25,19 +25,6 @@ import torchcrepe
|
|
25 |
from infer import *
|
26 |
import logging
|
27 |
from infer_tools.infer_tool import *
|
28 |
-
##EDIT FOR CPU
|
29 |
-
# Open the file and read it into a string
|
30 |
-
with open("/home/user/.local/lib/python3.8/site-packages/torch/serialization.py") as f:
|
31 |
-
text = f.read()
|
32 |
-
# Replace the original line with the new line
|
33 |
-
text = text.replace("def load(f, map_location=None, pickle_module=pickle, **pickle_load_args):", "def load(f, map_location='cpu', pickle_module=pickle, **pickle_load_args):")
|
34 |
-
# Save the modified string to the original file
|
35 |
-
with open("/home/user/.local/lib/python3.8/site-packages/torch/serialization.py", "w") as f:
|
36 |
-
f.write(text)
|
37 |
-
print("Replaced")
|
38 |
-
#with open("/home/user/.local/lib/python3.8/site-packages/torch/serialization.py") as f:
|
39 |
-
# text = f.read()
|
40 |
-
#print(text)
|
41 |
############
|
42 |
logging.getLogger('numba').setLevel(logging.WARNING)
|
43 |
|
|
|
25 |
from infer import *
|
26 |
import logging
|
27 |
from infer_tools.infer_tool import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
############
|
29 |
logging.getLogger('numba').setLevel(logging.WARNING)
|
30 |
|