This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from difflib import SequenceMatcher | |
from transformers import AutoModelForCausalLM, AutoTokenizer | |
# Blacklist phrases we don't want | |
blacklisted_answers = ["I'm not sure", "I'm sorry,", "I'm not a "] | |
def similar(first_string, second_string): | |
""" | |
Checks how similar two strings are | |