hushell commited on
Commit
e337a53
1 Parent(s): 148375c

fix _curses.error: setupterm: could not find terminal

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -13,6 +13,10 @@ from dotmap import DotMap
13
  from PIL import Image
14
 
15
 
 
 
 
 
16
  # args
17
  args = DotMap()
18
  args.deploy = 'vanilla'
@@ -24,7 +28,7 @@ args.cx = '06d75168141bc47f1'
24
 
25
 
26
  # model
27
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
28
  model = get_model(args)
29
  model.to(device)
30
  #checkpoint = torch.load(args.resume, map_location='cpu')
 
13
  from PIL import Image
14
 
15
 
16
+ os.environ['TERM'] = 'linux'
17
+ os.environ['TERMINFO'] = '/etc/terminfo'
18
+
19
+
20
  # args
21
  args = DotMap()
22
  args.deploy = 'vanilla'
 
28
 
29
 
30
  # model
31
+ device = 'cpu' #torch.device("cuda" if torch.cuda.is_available() else "cpu")
32
  model = get_model(args)
33
  model.to(device)
34
  #checkpoint = torch.load(args.resume, map_location='cpu')