Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ def GetModel():
|
|
| 25 |
model.load_state_dict(torch.load('model.dat', map_location=torch.device('cpu')))
|
| 26 |
return model
|
| 27 |
|
| 28 |
-
|
| 29 |
def GetModelAndTokenizer():
|
| 30 |
model = GetModel()
|
| 31 |
tokenizer = AutoTokenizer.from_pretrained("Callidior/bert2bert-base-arxiv-titlegen")
|
|
|
|
| 25 |
model.load_state_dict(torch.load('model.dat', map_location=torch.device('cpu')))
|
| 26 |
return model
|
| 27 |
|
| 28 |
+
@st.cache(allow_output_mutation=True)
|
| 29 |
def GetModelAndTokenizer():
|
| 30 |
model = GetModel()
|
| 31 |
tokenizer = AutoTokenizer.from_pretrained("Callidior/bert2bert-base-arxiv-titlegen")
|