Kangarroar commited on
Commit
8371e66
1 Parent(s): 7c03ad2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ with open("/home/user/.local/lib/python3.8/site-packages/torch/serialization.py"
16
  text = f.read()
17
 
18
  # Replace the original line with the new line
19
- text = text.replace("map_location: MAP_LOCATION = None,", "map_location: MAP_LOCATION = 'cpu',")
20
  # Save the modified string to the original file
21
  with open("/home/user/.local/lib/python3.8/site-packages/torch/serialization.py", "w") as f:
22
  f.write(text)
 
16
  text = f.read()
17
 
18
  # Replace the original line with the new line
19
+ 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):")
20
  # Save the modified string to the original file
21
  with open("/home/user/.local/lib/python3.8/site-packages/torch/serialization.py", "w") as f:
22
  f.write(text)