Spaces:
Sleeping
Sleeping
Create chatgptmoderationapptest
Browse files- chatgptmoderationapptest +9 -0
chatgptmoderationapptest
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from openai import OpenAI
|
2 |
+
client = OpenAI()
|
3 |
+
|
4 |
+
response = client.moderations.create(
|
5 |
+
model="omni-moderation-latest",
|
6 |
+
input="...text to classify goes here...",
|
7 |
+
)
|
8 |
+
|
9 |
+
print(response)
|