From 443d10df32ca3ccf0fcafdf4348e7ab0f0247e79 Mon Sep 17 00:00:00 2001 From: Priscilla Parodi Date: Fri, 5 Jan 2024 10:59:10 -0500 Subject: [PATCH 1/2] Update plagiarism_detection_es.ipynb updated to latest eland version --- .../plagiarism_detection_es.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supporting-blog-content/plagiarism-detection-with-elasticsearch/plagiarism_detection_es.ipynb b/supporting-blog-content/plagiarism-detection-with-elasticsearch/plagiarism_detection_es.ipynb index 19f77e7d..7623a4ab 100644 --- a/supporting-blog-content/plagiarism-detection-with-elasticsearch/plagiarism_detection_es.ipynb +++ b/supporting-blog-content/plagiarism-detection-with-elasticsearch/plagiarism_detection_es.ipynb @@ -91,7 +91,7 @@ "# Set the model name from Hugging Face and task type\n", "# open ai detector model - developed by open ai https://github.com/openai/gpt-2-output-dataset/tree/master/detector\n", "hf_model_id='roberta-base-openai-detector'\n", - "tm = TransformerModel(hf_model_id, \"text_classification\")\n", + "tm = TransformerModel(model_id=hf_model_id, task_type="text_classification")\n", "\n", "#set the modelID as it is named in Elasticsearch\n", "es_model_id = tm.elasticsearch_model_id()\n", @@ -121,7 +121,7 @@ "# Set the model name from Hugging Face and task type\n", "# sentence-transformers model\n", "hf_model_id='sentence-transformers/all-mpnet-base-v2'\n", - "tm = TransformerModel(hf_model_id, \"text_embedding\")\n", + "tm = TransformerModel(model_id=hf_model_id, task_type="text_embedding")\n", "\n", "#set the modelID as it is named in Elasticsearch\n", "es_model_id = tm.elasticsearch_model_id()\n", From b6cddda49435d593121933e8d2396fe919f07bd8 Mon Sep 17 00:00:00 2001 From: Priscilla Parodi Date: Tue, 9 Jan 2024 11:21:34 -0500 Subject: [PATCH 2/2] update plagiarism_detection_es.ipynb quotes escaped --- .../plagiarism_detection_es.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supporting-blog-content/plagiarism-detection-with-elasticsearch/plagiarism_detection_es.ipynb b/supporting-blog-content/plagiarism-detection-with-elasticsearch/plagiarism_detection_es.ipynb index 7623a4ab..0018e5ff 100644 --- a/supporting-blog-content/plagiarism-detection-with-elasticsearch/plagiarism_detection_es.ipynb +++ b/supporting-blog-content/plagiarism-detection-with-elasticsearch/plagiarism_detection_es.ipynb @@ -91,7 +91,7 @@ "# Set the model name from Hugging Face and task type\n", "# open ai detector model - developed by open ai https://github.com/openai/gpt-2-output-dataset/tree/master/detector\n", "hf_model_id='roberta-base-openai-detector'\n", - "tm = TransformerModel(model_id=hf_model_id, task_type="text_classification")\n", + "tm = TransformerModel(model_id=hf_model_id, task_type=\"text_classification\")\n", "\n", "#set the modelID as it is named in Elasticsearch\n", "es_model_id = tm.elasticsearch_model_id()\n", @@ -121,7 +121,7 @@ "# Set the model name from Hugging Face and task type\n", "# sentence-transformers model\n", "hf_model_id='sentence-transformers/all-mpnet-base-v2'\n", - "tm = TransformerModel(model_id=hf_model_id, task_type="text_embedding")\n", + "tm = TransformerModel(model_id=hf_model_id, task_type=\"text_embedding\")\n", "\n", "#set the modelID as it is named in Elasticsearch\n", "es_model_id = tm.elasticsearch_model_id()\n",