Spaces:
Runtime error
Runtime error
fix text
Browse files
app.py
CHANGED
|
@@ -150,9 +150,10 @@ def predict_zh(text: str) -> List:
|
|
| 150 |
with gr.Blocks() as demo:
|
| 151 |
gr.Markdown(
|
| 152 |
"""
|
| 153 |
-
## ChatGPT Detector 🔬 (Linguistic version)
|
|
|
|
| 154 |
Visit our project on Github: [chatgpt-comparison-detection project](https://github.com/Hello-SimpleAI/chatgpt-comparison-detection)<br>
|
| 155 |
-
欢迎在 Github 上关注我们的 [ChatGPT 对比与检测项目](https://github.com/Hello-SimpleAI/chatgpt-comparison-detection)
|
| 156 |
We provide three kinds of detectors, all in Bilingual / 我们提供了三个版本的检测器,且都支持中英文:
|
| 157 |
- [QA version / 问答版](https://huggingface.co/spaces/Hello-SimpleAI/chatgpt-detector-qa)<br>
|
| 158 |
detect whether an **answer** is generated by ChatGPT for certain **question**, using PLM-based classifiers / 判断某个**问题的回答**是否由ChatGPT生成,使用基于PTM的分类器来开发;
|
|
@@ -160,20 +161,6 @@ with gr.Blocks() as demo:
|
|
| 160 |
detect whether a piece of text is ChatGPT generated, using PLM-based classifiers / 判断**单条文本**是否由ChatGPT生成,使用基于PTM的分类器来开发;
|
| 161 |
- [**Linguistic version / 语言学版** (👈 Current / 当前使用)](https://huggingface.co/spaces/Hello-SimpleAI/chatgpt-detector-ling)<br>
|
| 162 |
detect whether a piece of text is ChatGPT generated, using linguistic features / 判断**单条文本**是否由ChatGPT生成,使用基于语言学特征的模型来开发;
|
| 163 |
-
|
| 164 |
-
## Introduction:
|
| 165 |
-
Two Logistic regression models trained with two kinds of features:
|
| 166 |
-
1. [GLTR](https://aclanthology.org/P19-3019) Test-2, Language model predict token rank top-k buckets, top 10, 10-100, 100-1000, 1000+.
|
| 167 |
-
2. PPL-based, text ppl, `avg` & `max` & `std` of sentence ppls, `avg` & `max` &`std` of timestep ppls.
|
| 168 |
-
|
| 169 |
-
English LM is [GPT2-small](https://huggingface.co/gpt2).
|
| 170 |
-
|
| 171 |
-
## 介绍:
|
| 172 |
-
两个逻辑回归模型, 分别使用以下两种特征:
|
| 173 |
-
1. [GLTR](https://aclanthology.org/P19-3019) Test-2, 每个词的语言模型预测排名分桶, top 10, 10-100, 100-1000, 1000+.
|
| 174 |
-
2. 基于语言模型困惑度 (PPL), text ppl, `avg` & `max` & `std` of sentence ppls, `avg` & `max` &`std` of timestep ppls.
|
| 175 |
-
|
| 176 |
-
中文语言模型使用 闻仲 [Wenzhong-GPT2-110M](https://huggingface.co/IDEA-CCNL/Wenzhong-GPT2-110M).
|
| 177 |
|
| 178 |
"""
|
| 179 |
)
|
|
@@ -181,6 +168,13 @@ with gr.Blocks() as demo:
|
|
| 181 |
with gr.Tab("English"):
|
| 182 |
gr.Markdown(
|
| 183 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
Note: Providing more text to the `Text` box can make the prediction more accurate!
|
| 185 |
"""
|
| 186 |
)
|
|
@@ -199,6 +193,13 @@ with gr.Blocks() as demo:
|
|
| 199 |
with gr.Tab("中文版"):
|
| 200 |
gr.Markdown(
|
| 201 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
注意: 在`文本`栏中输入更多的文本,可以让预测更准确哦!
|
| 203 |
"""
|
| 204 |
)
|
|
|
|
| 150 |
with gr.Blocks() as demo:
|
| 151 |
gr.Markdown(
|
| 152 |
"""
|
| 153 |
+
## ChatGPT Detector 🔬 (Linguistic version / 语言学版)
|
| 154 |
+
|
| 155 |
Visit our project on Github: [chatgpt-comparison-detection project](https://github.com/Hello-SimpleAI/chatgpt-comparison-detection)<br>
|
| 156 |
+
欢迎在 Github 上关注我们的 [ChatGPT 对比与检测项目](https://github.com/Hello-SimpleAI/chatgpt-comparison-detection)<br>
|
| 157 |
We provide three kinds of detectors, all in Bilingual / 我们提供了三个版本的检测器,且都支持中英文:
|
| 158 |
- [QA version / 问答版](https://huggingface.co/spaces/Hello-SimpleAI/chatgpt-detector-qa)<br>
|
| 159 |
detect whether an **answer** is generated by ChatGPT for certain **question**, using PLM-based classifiers / 判断某个**问题的回答**是否由ChatGPT生成,使用基于PTM的分类器来开发;
|
|
|
|
| 161 |
detect whether a piece of text is ChatGPT generated, using PLM-based classifiers / 判断**单条文本**是否由ChatGPT生成,使用基于PTM的分类器来开发;
|
| 162 |
- [**Linguistic version / 语言学版** (👈 Current / 当前使用)](https://huggingface.co/spaces/Hello-SimpleAI/chatgpt-detector-ling)<br>
|
| 163 |
detect whether a piece of text is ChatGPT generated, using linguistic features / 判断**单条文本**是否由ChatGPT生成,使用基于语言学特征的模型来开发;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
|
| 165 |
"""
|
| 166 |
)
|
|
|
|
| 168 |
with gr.Tab("English"):
|
| 169 |
gr.Markdown(
|
| 170 |
"""
|
| 171 |
+
## Introduction:
|
| 172 |
+
Two Logistic regression models trained with two kinds of features:
|
| 173 |
+
1. [GLTR](https://aclanthology.org/P19-3019) Test-2, Language model predict token rank top-k buckets, top 10, 10-100, 100-1000, 1000+.
|
| 174 |
+
2. PPL-based, text ppl, sentence ppl, etc.
|
| 175 |
+
|
| 176 |
+
English LM is [GPT2-small](https://huggingface.co/gpt2).
|
| 177 |
+
|
| 178 |
Note: Providing more text to the `Text` box can make the prediction more accurate!
|
| 179 |
"""
|
| 180 |
)
|
|
|
|
| 193 |
with gr.Tab("中文版"):
|
| 194 |
gr.Markdown(
|
| 195 |
"""
|
| 196 |
+
## 介绍:
|
| 197 |
+
两个逻辑回归模型, 分别使用以下两种特征:
|
| 198 |
+
1. [GLTR](https://aclanthology.org/P19-3019) Test-2, 每个词的语言模型预测排名分桶, top 10, 10-100, 100-1000, 1000+.
|
| 199 |
+
2. 基于语言模型困惑度 (PPL), 整个文本的PPL、单个句子的PPL等特征.
|
| 200 |
+
|
| 201 |
+
中文语言模型使用 闻仲 [Wenzhong-GPT2-110M](https://huggingface.co/IDEA-CCNL/Wenzhong-GPT2-110M).
|
| 202 |
+
|
| 203 |
注意: 在`文本`栏中输入更多的文本,可以让预测更准确哦!
|
| 204 |
"""
|
| 205 |
)
|