PriyankaSatish commited on
Commit
8d7c6d6
·
verified ·
1 Parent(s): bfdceed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
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 ONE OR MORE OF the other categories based on the extracted text and description of the frames: Bullying, Nudity & Adult Content, Graphic Violence, Illegal Goods, Child Safety, Sexual Abuse, Profanity, Suicide/Self Harm, Violent Extremism and None. Return the following: Give out the result as Category - {whatever the category is} and then GIVE A PROPER JUSTIFICATION of the image categorization for that conclusion without any assumption from your side."},
 
 
 
 
 
 
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,