Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import os
|
|
5 |
import torch
|
6 |
import torch.nn as nn
|
7 |
from transformers.activations import get_activation
|
8 |
-
from transformers import AutoTokenizer,
|
9 |
|
10 |
|
11 |
st.title('GPT2:')
|
@@ -16,13 +16,13 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
16 |
def get_model():
|
17 |
|
18 |
#tokenizer = AutoTokenizer.from_pretrained("BigSalmon/InformalToFormalLincoln31")
|
19 |
-
#model =
|
20 |
|
21 |
#tokenizer = AutoTokenizer.from_pretrained("BigSalmon/InformalToFormalLincoln21")
|
22 |
-
#model =
|
23 |
|
24 |
tokenizer = AutoTokenizer.from_pretrained("BigSalmon/PointsOneSent")
|
25 |
-
model =
|
26 |
return model, tokenizer
|
27 |
|
28 |
model, tokenizer = get_model()
|
|
|
5 |
import torch
|
6 |
import torch.nn as nn
|
7 |
from transformers.activations import get_activation
|
8 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
9 |
|
10 |
|
11 |
st.title('GPT2:')
|
|
|
16 |
def get_model():
|
17 |
|
18 |
#tokenizer = AutoTokenizer.from_pretrained("BigSalmon/InformalToFormalLincoln31")
|
19 |
+
#model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln31")
|
20 |
|
21 |
#tokenizer = AutoTokenizer.from_pretrained("BigSalmon/InformalToFormalLincoln21")
|
22 |
+
#model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln21")
|
23 |
|
24 |
tokenizer = AutoTokenizer.from_pretrained("BigSalmon/PointsOneSent")
|
25 |
+
model = AutoModelForCausalLM.from_pretrained("BigSalmon/PointsOneSent")
|
26 |
return model, tokenizer
|
27 |
|
28 |
model, tokenizer = get_model()
|