Spaces:
Running
Running
st cache blabla
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from streamlit.elements.altair import generate_chart
|
|
3 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
4 |
from transformers import pipeline
|
5 |
|
6 |
-
@st.cache(
|
7 |
def load_model():
|
8 |
model_ckpt = "flax-community/gpt2-rap-lyric-generator"
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_ckpt,from_flax=True)
|
|
|
3 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
4 |
from transformers import pipeline
|
5 |
|
6 |
+
@st.cache(allow_output_mutation=True)
|
7 |
def load_model():
|
8 |
model_ckpt = "flax-community/gpt2-rap-lyric-generator"
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_ckpt,from_flax=True)
|