Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +1 -1
src/streamlit_app.py
CHANGED
|
@@ -14,7 +14,7 @@ st.header("Generate candidate titles for articles")
|
|
| 14 |
|
| 15 |
st_model_load = st.text('Loading title generator model...')
|
| 16 |
|
| 17 |
-
@st.
|
| 18 |
def load_model():
|
| 19 |
print("Loading model...")
|
| 20 |
tokenizer = T5Tokenizer.from_pretrained(model_name, trust_remote_code=True)
|
|
|
|
| 14 |
|
| 15 |
st_model_load = st.text('Loading title generator model...')
|
| 16 |
|
| 17 |
+
@st.cache_resource
|
| 18 |
def load_model():
|
| 19 |
print("Loading model...")
|
| 20 |
tokenizer = T5Tokenizer.from_pretrained(model_name, trust_remote_code=True)
|