Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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,
|
8 |
|
9 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
10 |
-
model =
|
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")
|