Huu076 commited on
Commit
ca829f1
·
verified ·
1 Parent(s): ab2e05f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -15,7 +15,7 @@ On October 5, CNBC reported that LG Energy Solution Ltd (KRX:373220), one of the
15
 
16
  ner_examples = [[
17
  text1,
18
- "brand, date, quantity, car kind"
19
  ]]
20
 
21
  def merge_entities(entities):
@@ -57,15 +57,13 @@ def process(
57
 
58
  with gr.Blocks(title="NER Task") as ner_interface:
59
  input_text = gr.Textbox(label="Text input", placeholder="Enter your text here")
60
- labels = gr.Textbox(label="Labels", placeholder="Enter your labels here (comma separated)", scale=2)
61
- threshold = 0.5
62
- nested_ner = False
63
  output = gr.HighlightedText(label="Predicted Entities")
64
  submit_btn = gr.Button("Submit")
65
  examples = gr.Examples(
66
  ner_examples,
67
  fn=process,
68
- inputs=[input_text, labels, threshold, nested_ner],
69
  outputs=output,
70
  cache_examples=True
71
  )
 
15
 
16
  ner_examples = [[
17
  text1,
18
+ "brand, date, quantity, car kind", 0.5, False
19
  ]]
20
 
21
  def merge_entities(entities):
 
57
 
58
  with gr.Blocks(title="NER Task") as ner_interface:
59
  input_text = gr.Textbox(label="Text input", placeholder="Enter your text here")
60
+ labels = gr.Textbox(label="Labels", placeholder="Enter your labels here (comma separated)", scale=2)
 
 
61
  output = gr.HighlightedText(label="Predicted Entities")
62
  submit_btn = gr.Button("Submit")
63
  examples = gr.Examples(
64
  ner_examples,
65
  fn=process,
66
+ inputs=[input_text, labels, 0.5, False],
67
  outputs=output,
68
  cache_examples=True
69
  )