jonathanjordan21 commited on
Commit
fd1af44
1 Parent(s): 044b8d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -51,7 +51,7 @@ def greet_json():
51
 
52
  @app.post("/key_phrase_extraction")
53
  async def key_phrase_extraction(inp: InputText):
54
- return [{"label": x["word"], "score": float(x["score"])} for x in ner(inp.text) if x["score"] > inp.threshold]
55
 
56
  # @app.post("/key_phrase_extraction")
57
  # async def key_phrase_extraction(inp:InputText):
 
51
 
52
  @app.post("/key_phrase_extraction")
53
  async def key_phrase_extraction(inp: InputText):
54
+ return [{"label": x["word"], "score": float(x["score"])} for x in ner(inp.text) if x["score"] > inp.threshold and x["entity_group"] != "CRD"]
55
 
56
  # @app.post("/key_phrase_extraction")
57
  # async def key_phrase_extraction(inp:InputText):