Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,13 @@ import time
|
|
3 |
import torch
|
4 |
|
5 |
from better_transformer import *
|
6 |
-
torch.set_default_device(torch.device("cuda"))
|
7 |
|
8 |
def main():
|
9 |
|
10 |
# Enable CUDA if available and load in tokenizer
|
11 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
12 |
tokenizer, EMPTY_TOKENS = load_tokenizer(device)
|
|
|
13 |
|
14 |
st.title("Scaling Transformers")
|
15 |
st.subheader("UCLA DSU Project, Fall 2023")
|
|
|
3 |
import torch
|
4 |
|
5 |
from better_transformer import *
|
|
|
6 |
|
7 |
def main():
|
8 |
|
9 |
# Enable CUDA if available and load in tokenizer
|
10 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
11 |
tokenizer, EMPTY_TOKENS = load_tokenizer(device)
|
12 |
+
model.cuda()
|
13 |
|
14 |
st.title("Scaling Transformers")
|
15 |
st.subheader("UCLA DSU Project, Fall 2023")
|