rajistics commited on
Commit
3c577a6
1 Parent(s): 6f488a4

back to gradio

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,9 +31,9 @@ def text_to_sentiment(text):
31
  ##Company Extraction
32
  def fin_ner(text):
33
  print ("ner")
34
- ner_pipeline = pipeline("ner", model="dslim/bert-base-NER", tokenizer="dslim/bert-base-NER")
35
- #api = gr.Interface.load("dslim/bert-base-NER", src='models')
36
- replaced_spans = ner_pipeline(text)
37
  print (replaced_spans)
38
  print ("spans2")
39
  #replaced_spans = [(key, None) if value=='No Disease' else (key, value) for (key, value) in spans]
 
31
  ##Company Extraction
32
  def fin_ner(text):
33
  print ("ner")
34
+ #ner_pipeline = pipeline("ner", model="dslim/bert-base-NER", tokenizer="dslim/bert-base-NER")
35
+ api = gr.Interface.load("dslim/bert-base-NER", src='models')
36
+ replaced_spans = api(text)
37
  print (replaced_spans)
38
  print ("spans2")
39
  #replaced_spans = [(key, None) if value=='No Disease' else (key, value) for (key, value) in spans]