litagin commited on
Commit
5f43bee
·
1 Parent(s): a1694cd

Use float16 for gpu

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -37,6 +37,7 @@ pipe_dict = {
37
  "automatic-speech-recognition",
38
  model=v,
39
  device="cuda" if torch.cuda.is_available() else "cpu",
 
40
  )
41
  for k, v in model_dict.items()
42
  }
 
37
  "automatic-speech-recognition",
38
  model=v,
39
  device="cuda" if torch.cuda.is_available() else "cpu",
40
+ torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
41
  )
42
  for k, v in model_dict.items()
43
  }