Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -138,7 +138,13 @@ def analyze_content_with_openai(text, description):
|
|
| 138 |
response = client.chat.completions.create(
|
| 139 |
model="gpt-4-vision-preview",
|
| 140 |
messages=[
|
| 141 |
-
{"role": "system", "content": "Classify the following image into 'none' or
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
{"role": "user", "content": f"Text: {text}\nDescription: {description}"}
|
| 143 |
],
|
| 144 |
max_tokens=4096,
|
|
|
|
| 138 |
response = client.chat.completions.create(
|
| 139 |
model="gpt-4-vision-preview",
|
| 140 |
messages=[
|
| 141 |
+
{"role": "system", "content": "Classify the following image into 'none' or one of the other\
|
| 142 |
+
categories based on the extracted text and description of the frames: Bullying, Nudity & \
|
| 143 |
+
Adult Content, Graphic Violence, Illegal Goods, Child Safety, Sexual Abuse, Profanity, \
|
| 144 |
+
Suicide/Self Harm, Violent Extremism and None. Return the following: Give out the result\
|
| 145 |
+
as Category - {whatever the category is} and then GIVE A PROPER JUSTIFICATION of the\
|
| 146 |
+
image categorization for that conclusion without any assumption from your side. Do not assume\
|
| 147 |
+
the reasoning behind the content in the frames."},
|
| 148 |
{"role": "user", "content": f"Text: {text}\nDescription: {description}"}
|
| 149 |
],
|
| 150 |
max_tokens=4096,
|