BigSalmon commited on
Commit
a90aae5
1 Parent(s): a54a5d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import streamlit as st
2
- from transformers import AutoTokenizer, AutoModelForCausalLM
3
  import torch
4
 
5
  first = """informal english: corn fields are all across illinois, visible once you leave chicago.\nTranslated into the Style of Abraham Lincoln: corn fields ( permeate illinois / span the state of illinois / ( occupy / persist in ) all corners of illinois / line the horizon of illinois / envelop the landscape of illinois ), manifesting themselves visibly as one ventures beyond chicago.\n\ninformal english: """
@@ -10,6 +10,7 @@ def get_model():
10
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln21")
11
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln40")
12
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln41")
 
13
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/GPT2InformalToFormalLincoln42")
14
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/Points3")
15
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/GPTNeo1.3BPointsLincolnFormalInformal")
@@ -21,8 +22,8 @@ def get_model():
21
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/MediumInformalToFormalLincoln4")
22
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/GPT2Neo1.3BPoints2")
23
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/GPT2Neo1.3BPoints3")
24
- model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln41")
25
- tokenizer = AutoTokenizer.from_pretrained("BigSalmon/Points2")
26
  return model, tokenizer
27
 
28
  model, tokenizer = get_model()
 
1
  import streamlit as st
2
+ from transformers import AutoTokenizer, AutoModelForCausalLM, AutoModel
3
  import torch
4
 
5
  first = """informal english: corn fields are all across illinois, visible once you leave chicago.\nTranslated into the Style of Abraham Lincoln: corn fields ( permeate illinois / span the state of illinois / ( occupy / persist in ) all corners of illinois / line the horizon of illinois / envelop the landscape of illinois ), manifesting themselves visibly as one ventures beyond chicago.\n\ninformal english: """
 
10
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln21")
11
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln40")
12
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln41")
13
+ #model = AutoModelForCausalLM.from_pretrained("BigSalmon/InformalToFormalLincoln41")
14
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/GPT2InformalToFormalLincoln42")
15
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/Points3")
16
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/GPTNeo1.3BPointsLincolnFormalInformal")
 
22
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/MediumInformalToFormalLincoln4")
23
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/GPT2Neo1.3BPoints2")
24
  #model = AutoModelForCausalLM.from_pretrained("BigSalmon/GPT2Neo1.3BPoints3")
25
+ model = AutoModel.from_pretrained("facebook/opt-125m")
26
+ tokenizer = AutoTokenizer.from_pretrained("facebook/opt-125m")
27
  return model, tokenizer
28
 
29
  model, tokenizer = get_model()