Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -31,7 +31,7 @@ def get_labels(text, model, tokenizer, count_labels=8):
|
|
| 31 |
return result_labels
|
| 32 |
result_labels.append(pair[1])
|
| 33 |
|
| 34 |
-
@st.cache()
|
| 35 |
def load_model(model, filename):
|
| 36 |
model.load_state_dict(torch.load(filename))
|
| 37 |
return model
|
|
|
|
| 31 |
return result_labels
|
| 32 |
result_labels.append(pair[1])
|
| 33 |
|
| 34 |
+
@st.cache(allow_output_mutation=True)
|
| 35 |
def load_model(model, filename):
|
| 36 |
model.load_state_dict(torch.load(filename))
|
| 37 |
return model
|