aisah1 commited on
Commit
a3beba9
1 Parent(s): 70c9dd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,10 +4,10 @@ from os import system
4
  system("pip3 install torch")
5
  system("pip3 install transformers")
6
 
7
- from transformers import AutoTokenizer,OpenAIGPTLMHeadModel
8
 
9
- tokenizer = AutoTokenizer.from_pretrained("openai-community/openai-gpt")
10
- model = OpenAIGPTLMHeadModel.from_pretrained("openai-community/openai-gpt")
11
 
12
  def work(inp_text):
13
  out = tokenizer.encode(inp_text,return_tensors="pt")
 
4
  system("pip3 install torch")
5
  system("pip3 install transformers")
6
 
7
+ from transformers import AutoTokenizer,AutoModelForCausalLM
8
 
9
+ tokenizer = AutoTokenizer.from_pretrained("apple/OpenELM-270M")
10
+ model = openelm_270m = AutoModelForCausalLM.from_pretrained("apple/OpenELM-270M", trust_remote_code=True)
11
 
12
  def work(inp_text):
13
  out = tokenizer.encode(inp_text,return_tensors="pt")