Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
# 加载模型
|
5 |
-
sentiment_model = pipeline("
|
6 |
|
7 |
def predict(text):
|
8 |
return sentiment_model(text)
|
@@ -12,7 +12,7 @@ interface = gr.Interface(
|
|
12 |
fn=predict,
|
13 |
inputs="text",
|
14 |
outputs="text",
|
15 |
-
title="
|
16 |
)
|
17 |
|
18 |
interface.launch()
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
# 加载模型
|
5 |
+
sentiment_model = pipeline("chatgpt-detector-roberta")
|
6 |
|
7 |
def predict(text):
|
8 |
return sentiment_model(text)
|
|
|
12 |
fn=predict,
|
13 |
inputs="text",
|
14 |
outputs="text",
|
15 |
+
title="chatgpt-detector-roberta"
|
16 |
)
|
17 |
|
18 |
interface.launch()
|