Spaces:
Sleeping
Sleeping
AhsanShahid
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,8 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
5 |
# Load GPT-2 model and tokenizer
|
6 |
@st.cache(allow_output_mutation=True)
|
7 |
def load_model():
|
8 |
-
tokenizer = AutoTokenizer.from_pretrained("gpt2")
|
9 |
-
model = AutoModelForCausalLM.from_pretrained("gpt2")
|
10 |
return tokenizer, model
|
11 |
|
12 |
tokenizer, model = load_model()
|
|
|
5 |
# Load GPT-2 model and tokenizer
|
6 |
@st.cache(allow_output_mutation=True)
|
7 |
def load_model():
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained("gpt2-large")
|
9 |
+
model = AutoModelForCausalLM.from_pretrained("gpt2-large")
|
10 |
return tokenizer, model
|
11 |
|
12 |
tokenizer, model = load_model()
|