Spaces:
Sleeping
Sleeping
Asankhaya Sharma
commited on
Commit
·
c4709fb
1
Parent(s):
af7e3ad
app.py
CHANGED
@@ -6,7 +6,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
6 |
checkpoint = "gpt2-large"
|
7 |
|
8 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
9 |
-
@st.
|
10 |
def load_model(model_name):
|
11 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
12 |
return model
|
|
|
6 |
checkpoint = "gpt2-large"
|
7 |
|
8 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
9 |
+
@st.cache
|
10 |
def load_model(model_name):
|
11 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
12 |
return model
|