samsl commited on
Commit
192ab7a
1 Parent(s): a8ca144

Update app.py

Browse files

Wrong cuda device code

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -82,7 +82,7 @@ fold_vocab = {
82
  def predict(model_name, pairs_file, sequence_file, progress = gr.Progress()):
83
 
84
  run_id = uuid4()
85
- device = torch.cuda("0") if torch.cuda.is_available() else torch.device("cpu")
86
 
87
  # gr.Info("Loading model...")
88
  _ = lm_embed("M", use_cuda = (device.type == "cuda"))
 
82
  def predict(model_name, pairs_file, sequence_file, progress = gr.Progress()):
83
 
84
  run_id = uuid4()
85
+ device = torch.device("0") if torch.cuda.is_available() else torch.device("cpu")
86
 
87
  # gr.Info("Loading model...")
88
  _ = lm_embed("M", use_cuda = (device.type == "cuda"))