From 6bca29de0d6dd1a92a840a26f73a630160c9b9a4 Mon Sep 17 00:00:00 2001 From: ahmed531998 Date: Sun, 16 Apr 2023 22:32:21 +0200 Subject: [PATCH] fix --- NLU.py | 6 +++--- readme.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NLU.py b/NLU.py index 292fcd8..046037d 100644 --- a/NLU.py +++ b/NLU.py @@ -94,7 +94,7 @@ class NLU: if score > 0.5: entities = self._entityextractor() offense = self._offensepredictor() - if intent in ['FINDPAPER', 'FINDDATASET', 'SUMMARIZEPAPER', 'EXPLAINPOST'] and len(entities) == 0: + if intent in ['FINDPAPER', 'FINDDATASET', 'SUMMARIZEPAPER'] and len(entities) == 0: return {"modified_query": self.to_process, "intent": intent, "entities": entities, "is_offensive": offense, "is_clear": False} return {"modified_query": self.to_process, "intent": intent, "entities": entities, "is_offensive": offense, "is_clear": True} else: @@ -104,7 +104,7 @@ class NLU: entities = self._entityextractor() offense = self._offensepredictor() if score > 0.5 or not self._ambigpredictor(): - if intent in ['FINDPAPER', 'FINDDATASET', 'SUMMARIZEPAPER', 'EXPLAINPOST'] and len(entities) == 0: + if intent in ['FINDPAPER', 'FINDDATASET', 'SUMMARIZEPAPER'] and len(entities) == 0: return {"modified_query": self.to_process, "intent": intent, "entities": entities, "is_offensive": offense, "is_clear": False} return {"modified_query": self.to_process, "intent": intent, "entities": entities, "is_offensive": offense, "is_clear": True} @@ -114,6 +114,6 @@ class NLU: else: entities = self._entityextractor() offense = self._offensepredictor() - if intent in ['FINDPAPER', 'FINDDATASET', 'SUMMARIZEPAPER', 'EXPLAINPOST'] and len(entities) == 0: + if intent in ['FINDPAPER', 'FINDDATASET', 'SUMMARIZEPAPER'] and len(entities) == 0: return {"modified_query": self.to_process, "intent": intent, "entities": entities, "is_offensive": offense, "is_clear": False} return {"modified_query": self.to_process, "intent": intent, "entities": entities, "is_offensive": offense, "is_clear": True} diff --git a/readme.md b/readme.md index 942e151..3980c1f 100644 --- a/readme.md +++ b/readme.md @@ -1 +1 @@ -Run main.py to start the backend! +Run main.py to trigger the backend!