Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|