Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ app = FastAPI()
|
|
8 |
# 加载预训练模型
|
9 |
sentiment_model = pipeline("text-classification", model="openai-community/roberta-large-openai-detector")
|
10 |
|
11 |
-
#
|
12 |
class TextRequest(BaseModel):
|
13 |
text: str
|
14 |
|
|
|
8 |
# 加载预训练模型
|
9 |
sentiment_model = pipeline("text-classification", model="openai-community/roberta-large-openai-detector")
|
10 |
|
11 |
+
# 定义请求体格式
|
12 |
class TextRequest(BaseModel):
|
13 |
text: str
|
14 |
|