Skip to content

Commit

Permalink
Updates fine-tuning script
Browse files Browse the repository at this point in the history
  • Loading branch information
MaramHasanain committed Dec 11, 2023
1 parent de762d0 commit 4603340
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ def fix_single_label(label):

def fix_span(prediction):
# print(prediction)
if prediction.endswith(","):
prediction = prediction[0:-1] + "}]"

prediction = prediction.replace("},\n{", "}, {").replace("\\n", " ").replace("\n", " ").replace(
'[ ', '[').replace('[ ', '[').replace(" {", "{").replace(" ]", "]").replace(' ]', ']').strip()

Expand Down

0 comments on commit 4603340

Please sign in to comment.