Update app.py
Browse files
app.py
CHANGED
@@ -20,6 +20,9 @@ async def predict(request: TextRequest):
|
|
20 |
for item in result:
|
21 |
if item["label"] == "LABEL_0":
|
22 |
item["score"] = 1 - item["score"]
|
|
|
|
|
|
|
23 |
return {"result": result}
|
24 |
|
25 |
if __name__ == "__main__":
|
|
|
20 |
for item in result:
|
21 |
if item["label"] == "LABEL_0":
|
22 |
item["score"] = 1 - item["score"]
|
23 |
+
elif item["label"] == "LABEL_1":
|
24 |
+
item["label"] = "AI"
|
25 |
+
print("处理后的 result:", result)
|
26 |
return {"result": result}
|
27 |
|
28 |
if __name__ == "__main__":
|