ms180 commited on
Commit
5dcded9
·
verified ·
1 Parent(s): 1f20047

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -47,10 +47,17 @@ Please consider citing the following papers if you find our work helpful.
47
  ```
48
  '''
49
 
50
- if not torch.cuda.is_available():
51
- raise RuntimeError("Please use GPU for better inference speed.")
 
 
 
 
 
 
 
 
52
 
53
- device = "cuda"
54
  s2l = Speech2Language.from_pretrained(
55
  model_tag=f"espnet/owsm_v4_medium_1B",
56
  device=device,
 
47
  ```
48
  '''
49
 
50
+ # The following lines are commented out for now.
51
+ # We will activate after we get GPU grant.
52
+
53
+ # if not torch.cuda.is_available():
54
+ # raise RuntimeError("Please use GPU for better inference speed.")
55
+
56
+ # device = "cuda"
57
+
58
+ device = "cuda" if torch.cuda.is_available() else "cpu"
59
+
60
 
 
61
  s2l = Speech2Language.from_pretrained(
62
  model_tag=f"espnet/owsm_v4_medium_1B",
63
  device=device,