Upload 17 files

#18
by awinml - opened
Files changed (1) hide show
  1. utils/entity_extraction.py +2 -1
utils/entity_extraction.py CHANGED
@@ -79,7 +79,8 @@ def all_keywords_combs(texts):
79
 
80
 
81
  def extract_keywords(query_text, model):
82
- prompt = f"###Instruction:Extract the important keywords which describe the context accurately.\n\nInput:{query_text}\n\n###Response:"
 
83
  response = model.predict(prompt)
84
  keywords = response.split(", ")
85
  keywords = keywords_no_companies(keywords)
 
79
 
80
 
81
  def extract_keywords(query_text, model):
82
+ prompt = "###Instruction: Identify the key entities that accurately describe the context.\n\nInput:{query_text}\n\n###Response:"
83
+ #prompt = f"###Instruction:Extract the important keywords which describe the context accurately.\n\nInput:{query_text}\n\n###Response:"
84
  response = model.predict(prompt)
85
  keywords = response.split(", ")
86
  keywords = keywords_no_companies(keywords)