Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,10 +47,17 @@ Please consider citing the following papers if you find our work helpful.
|
|
| 47 |
```
|
| 48 |
'''
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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,
|