akdeniz27 commited on
Commit
5b3d11c
·
1 Parent(s): d84f151

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -53,13 +53,11 @@ 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
- @st.cache
57
  def setModel(model_checkpoint, aggregation):
58
  model = AutoModelForTokenClassification.from_pretrained(model_checkpoint)
59
  tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
60
  return pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy=aggregation)
61
-
62
- @st.cache
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", " ")
 
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)
59
  return pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy=aggregation)
60
+
 
61
  def get_html(html: str):
62
  WRAPPER = """<div style="overflow-x: auto; border: 1px solid #e6e9ef; border-radius: 0.25rem; padding: 1rem; margin-bottom: 2.5rem">{}</div>"""
63
  html = html.replace("\n", " ")