From f0e9ecc7307f3ee8ce9fa79e0f1cd02690d70e7f Mon Sep 17 00:00:00 2001 From: vish <32350453+vishwachintu@users.noreply.github.com> Date: Thu, 20 Jul 2023 22:17:03 +0530 Subject: [PATCH] Update nli_attack.py This avoid the user from getting an error from SSL. This change can be made for all the examples. --- examples/nli_attack.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/nli_attack.py b/examples/nli_attack.py index f085eb3..f915ab7 100644 --- a/examples/nli_attack.py +++ b/examples/nli_attack.py @@ -4,6 +4,8 @@ import OpenAttack import transformers import datasets +import ssl +ssl._create_default_https_context = ssl._create_unverified_context class NLIWrapper(OpenAttack.classifiers.Classifier): def __init__(self, model : OpenAttack.classifiers.Classifier): @@ -48,4 +50,4 @@ def main(): attack_eval.eval(dataset, visualize=True) if __name__ == "__main__": - main() \ No newline at end of file + main()