MuGeminorum commited on
Commit
718237e
1 Parent(s): eca1055
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,7 +41,7 @@ def download_model(url="https://huggingface.co/MuGeminorum/SVHN-Recognition/reso
41
  def _infer(path_to_checkpoint_file, path_to_input_image):
42
  model = Model()
43
  model.restore(path_to_checkpoint_file)
44
- model.cuda()
45
  outstr = ''
46
 
47
  with torch.no_grad():
@@ -55,7 +55,7 @@ def _infer(path_to_checkpoint_file, path_to_input_image):
55
  image = Image.open(path_to_input_image)
56
  image = image.convert('RGB')
57
  image = transform(image)
58
- images = image.unsqueeze(dim=0).cuda()
59
 
60
  length_logits, digit1_logits, digit2_logits, digit3_logits, digit4_logits, digit5_logits = model.eval()(images)
61
 
 
41
  def _infer(path_to_checkpoint_file, path_to_input_image):
42
  model = Model()
43
  model.restore(path_to_checkpoint_file)
44
+ # model.cuda()
45
  outstr = ''
46
 
47
  with torch.no_grad():
 
55
  image = Image.open(path_to_input_image)
56
  image = image.convert('RGB')
57
  image = transform(image)
58
+ images = image.unsqueeze(dim=0) # .cuda()
59
 
60
  length_logits, digit1_logits, digit2_logits, digit3_logits, digit4_logits, digit5_logits = model.eval()(images)
61