BigSalmon commited on
Commit
7671981
1 Parent(s): 599c53c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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, AutoModelWithLMHead
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 = AutoModelWithLMHead.from_pretrained("BigSalmon/InformalToFormalLincoln31")
20
 
21
  #tokenizer = AutoTokenizer.from_pretrained("BigSalmon/InformalToFormalLincoln21")
22
- #model = AutoModelWithLMHead.from_pretrained("BigSalmon/InformalToFormalLincoln21")
23
 
24
  tokenizer = AutoTokenizer.from_pretrained("BigSalmon/PointsOneSent")
25
- model = AutoModelWithLMHead.from_pretrained("BigSalmon/PointsOneSent")
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()