Kangarroar commited on
Commit
7c03ad2
1 Parent(s): 4f709a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -17,11 +17,15 @@ with open("/home/user/.local/lib/python3.8/site-packages/torch/serialization.py"
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
- print("Replaced")
21
- print(/home/user/.local/lib/python3.8/site-packages/torch/serialization.py)
22
  # Save the modified string to the original file
23
  with open("/home/user/.local/lib/python3.8/site-packages/torch/serialization.py", "w") as f:
24
  f.write(text)
 
 
 
 
 
 
25
  ############
26
  logging.getLogger('numba').setLevel(logging.WARNING)
27
 
 
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)
23
+
24
+ print("Replaced")
25
+ with open("/home/user/.local/lib/python3.8/site-packages/torch/serialization.py") as f:
26
+ text = f.read()
27
+ print(text)
28
+
29
  ############
30
  logging.getLogger('numba').setLevel(logging.WARNING)
31