From 842532aee641307eb8bb67e9a5b5f6645b67fee7 Mon Sep 17 00:00:00 2001
From: Sandra Friebolin <friebolin@cluster.cl.uni-heidelberg.de>
Date: Fri, 24 Feb 2023 12:43:53 +0100
Subject: [PATCH] Update inference

---
 Code/inference.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Code/inference.py b/Code/inference.py
index 212d4c5..2deb942 100644
--- a/Code/inference.py
+++ b/Code/inference.py
@@ -47,7 +47,7 @@ def find_target_position(split_sentence, split_target):
 
 
 pos = find_target_position(split_sentence, split_target)
-target_json = json.loads(pos)
+#target_json = json.loads(pos)
 print(f"The target word is {target_word} and at the position {pos}.")
 
 print("Now enter the label: 0 for literal, 1 for non-literal")
@@ -55,7 +55,7 @@ label = int(input())
 
 
 # Convert to data sample for BERT
-data_sample = [{"sentence": sentence, "pos": target_json, "label": label}]
+data_sample = [{"sentence": sentence, "pos": pos, "label": label}]
 print(data_sample)
 
 tokenizer=AutoTokenizer.from_pretrained("bert-base-uncased")
-- 
GitLab