From ee7216f991fffff203da21d4820aeadaebe00d4d Mon Sep 17 00:00:00 2001 From: jiucchu <128274035+jiucchu@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:51:37 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=81=B4=EB=9F=AC=EC=8A=A4=ED=84=B0?= =?UTF-8?q?=EB=A7=81=20=EA=B2=B0=EA=B3=BC=EB=A5=BC=20memberId=EB=A1=9C=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AI/model.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/AI/model.py b/AI/model.py index 97ea7f9b..7cd28088 100644 --- a/AI/model.py +++ b/AI/model.py @@ -25,7 +25,7 @@ async def start_sbert(): return {'message' : "sbert is starting"} class Item(BaseModel) : - name: str + memberId: str sentence : str class Item_and_num(BaseModel) : @@ -79,4 +79,12 @@ async def start_sbert(data:Item_and_num): while [] in copy_list: copy_list.remove([]) + + for i in range(len(copy_list)): + for j in range (len(copy_list[i])): + target_value = copy_list[i][j] + for Item in input : + if Item.sentence == target_value : + copy_list[i][j] = Item.memberId + return copy_list