diff --git a/DESCRIPTION.md b/DESCRIPTION.md new file mode 100644 index 0000000..a0e7d04 --- /dev/null +++ b/DESCRIPTION.md @@ -0,0 +1,18 @@ +# Description + +(To be used as the long description on the Chrome and Firefox pages) + +--- + +OpenAI's recently released GPT-2 model has revealed itself to be capable of generating incredibly human-like text. + +With the rampant spread of fake news and reviews in today's world, such tools may pose a threat to the quality of the information found on the internet. + +Luckily, OpenAI also released a detector which is designed to detect whether a given portion of text has been generated by GPT-2 or not. + +This extension brings the detector to your browser via a simple browser extension. Simply select a portion of text (at least 50 words) and the extension will determine and display the probability of whether the selected text was generated by GPT-2 or not. + +Some notes: + +- The detector itself does not run in your browser. The extension makes HTTP requests to https://huggingface.co/openai-detector where the detector is publicly hosted and processes the response, displaying the results in your browser. +- Results should be taken with a grain of salt. The detector is designed specifically to work with GPT-2 generated text. Using a different model or finetuning GPT-2 could be enough to avoid detection. In general, the detector is imperfect. Human-generated text may be marked as GPT-2 generated, and vice-versa. diff --git a/README.md b/README.md index bc2b15b..e279339 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A browser extension that displays the [GPT-2](https://openai.com/blog/better-language-models/) Log Probability of selected portions of text. -Among the many things that [OpenAI](https://openai.com/)'s GPT-2 model can do, one of these is detecting with certain amount of certainty whether a given portion of text is fake or real. This extension hopes to bring this functionality to your browser (Chrome and Firefox). +Among the many things that [OpenAI](https://openai.com/)'s GPT-2 model can do, one of these is detecting with a certain amount of certainty whether a given portion of text is human-generated. This extension hopes to bring this functionality to your browser (Chrome and Firefox). Inspired by [this tweet](https://twitter.com/karpathy/status/1192169928079503360?s=20) from [Andrej Karpathy](https://cs.stanford.edu/~karpathy/), the director of AI at [Tesla](https://www.tesla.com/). diff --git a/src/content/content.js b/src/content/content.js index 123f6bd..9b6ff7a 100644 --- a/src/content/content.js +++ b/src/content/content.js @@ -14,7 +14,7 @@ function gotMessage(message) { } } -// determines how real a portion of selected text is +// determines how human-like a portion of selected text is function evaluateSelection() { // initiate element variable let element; @@ -48,11 +48,11 @@ function evaluateSelection() { // parse the response from Hugging Face let all_tokens = json.all_tokens; let used_tokens = json.used_tokens; - let realness = Math.round(json.real_probability * 100 * 100) / 100; - let css_color_string = generateHSLString(realness, 0, 120); + let human_likeness = Math.round(json.real_probability * 100 * 100) / 100; + let css_color_string = generateHSLString(human_likeness, 0, 120); // prepare the message - let message_text = `According to the detector, there is a ${realness} % chance that the selected text is real. ${used_tokens} out of ${all_tokens} tokens were considered`; + let message_text = `According to the detector, there is a ${human_likeness} % chance that the selected text written by a human. ${used_tokens} out of ${all_tokens} tokens were considered.`; // update the message element with the outcome message_element.text(message_text); message_element.css("border", `2px dashed ${css_color_string}`); diff --git a/src/manifest.json b/src/manifest.json index c629e74..c25e977 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 2, "name": "GPTrue or False", - "version": "3.0.1", - "description": "Display OpenAI's GPT-2 log probability of a sample of text.", + "version": "3.0.2", + "description": "Display the likelihood that a sample of text was generated by OpenAI's GPT-2 model.", "icons": { "16": "./images/icon/16.png", "32": "./images/icon/32.png", diff --git a/src/popup/index.html b/src/popup/index.html index 8694e78..2ae428a 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -17,14 +17,15 @@

GPTrue or False

- Display OpenAI's GPT-2 log probability of a sample of text. Is the given - text falsely generated? + Let OpenAI's GPT-2 detector evaluate a sample of text. Is the given text + computer generated?

-

Determine realness of selected text

+

Evaluate a text selection

Select at least 50 words from the current page and press the button - below to determine the realness of the selected text. + below to determine the how likely it is that the selected text was + written by a human.