akdeniz27 commited on
Commit
39e80d1
·
1 Parent(s): 8b58a2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -53,6 +53,7 @@ elif input_method == "Write or Paste New Text":
53
  st.subheader("Text to Run")
54
  input_text = st.text_area('Write or Paste Text Below', value="", height=128, max_chars=None, key=2)
55
 
 
56
  def setModel(model_checkpoint, aggregation):
57
  model = AutoModelForTokenClassification.from_pretrained(model_checkpoint)
58
  tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
 
53
  st.subheader("Text to Run")
54
  input_text = st.text_area('Write or Paste Text Below', value="", height=128, max_chars=None, key=2)
55
 
56
+ @st.cache(allow_output_mutation=True)
57
  def setModel(model_checkpoint, aggregation):
58
  model = AutoModelForTokenClassification.from_pretrained(model_checkpoint)
59
  tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)