minnehwg commited on
Commit
64d5b64
1 Parent(s): b6f0887

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ def predict_sentence(model, tokenizer, sentence):
25
  title = convert_label_to_title(predicted_class)
26
  return title, probabilities.numpy(), highest_probability
27
 
28
- @st.cache(allow_output_mutation=True)
29
  def load_model(checkpoint, num_class):
30
  model = TFAutoModelForSequenceClassification.from_pretrained(checkpoint, num_labels=num_class)
31
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)
 
25
  title = convert_label_to_title(predicted_class)
26
  return title, probabilities.numpy(), highest_probability
27
 
28
+ @st.cache_resource
29
  def load_model(checkpoint, num_class):
30
  model = TFAutoModelForSequenceClassification.from_pretrained(checkpoint, num_labels=num_class)
31
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)