Update app.py
Browse files
app.py
CHANGED
|
@@ -59,6 +59,7 @@ def setModel(model_checkpoint, aggregation):
|
|
| 59 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
| 60 |
return pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy=aggregation)
|
| 61 |
|
|
|
|
| 62 |
def get_html(html: str):
|
| 63 |
WRAPPER = """<div style="overflow-x: auto; border: 1px solid #e6e9ef; border-radius: 0.25rem; padding: 1rem; margin-bottom: 2.5rem">{}</div>"""
|
| 64 |
html = html.replace("\n", " ")
|
|
|
|
| 59 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
| 60 |
return pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy=aggregation)
|
| 61 |
|
| 62 |
+
@st.cache(allow_output_mutation=True)
|
| 63 |
def get_html(html: str):
|
| 64 |
WRAPPER = """<div style="overflow-x: auto; border: 1px solid #e6e9ef; border-radius: 0.25rem; padding: 1rem; margin-bottom: 2.5rem">{}</div>"""
|
| 65 |
html = html.replace("\n", " ")
|