Spaces:
Runtime error
Runtime error
Ryan Kim
commited on
Commit
·
49709ee
1
Parent(s):
4c791e1
cache fix
Browse files- src/main.py +1 -1
src/main.py
CHANGED
@@ -18,7 +18,7 @@ def label_dictionary(model_name):
|
|
18 |
return twitter_roberta
|
19 |
return lambda x: x
|
20 |
|
21 |
-
@st.
|
22 |
def load_model(model_name):
|
23 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
24 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
|
18 |
return twitter_roberta
|
19 |
return lambda x: x
|
20 |
|
21 |
+
@st.cache(allow_output_mutation=True)
|
22 |
def load_model(model_name):
|
23 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
24 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|