pathananas commited on
Commit
6311c46
ยท
verified ยท
1 Parent(s): 56a2edf

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +13 -8
model.py CHANGED
@@ -205,39 +205,44 @@ Confidence: **{audio_conf}%**
205
 
206
  if text_label:
207
  reasoning_lines.append(
 
208
  f"The text expresses a {text_label.lower()} sentiment with emotion "
209
  f"'{emotion_label}'. The topic appears related to {topic_label}."
210
  )
211
  # ================= IMAGE REASONING =================
212
  if image_label:
213
  reasoning_lines.append(
214
- f"The object classifier predicted '{image_label}' ({image_conf}% confidence), "
 
215
  "though this may be an approximate category."
216
  )
217
  if caption:
218
  reasoning_lines.append(
219
- f"The scene description suggests: '{caption}', which provides a more detailed "
220
- "interpretation of the visual content."
221
  )
222
 
223
  if audio_label:
224
  reasoning_lines.append(
 
225
  f"Spoken content carries a {audio_label.lower()} tone ({audio_conf}%)."
226
  )
227
  if text_label and audio_label:
228
  if text_label == "POSITIVE" and audio_label == "NEGATIVE":
229
  reasoning_lines.append(
230
- "โš  Cross-modal inconsistency detected: the text expresses positivity "
 
231
  "but the voice tone suggests negativity."
232
  )
233
  if text_label == "NEGATIVE" and audio_label == "POSITIVE":
234
- reasoning_lines.append(
235
- "โš  Cross-modal inconsistency detected: the text expresses negativity "
236
- "while the voice tone appears positive."
237
- )
238
  if image_label and topic_label:
239
  if topic_label == "technology":
240
  reasoning_lines.append(
 
241
  "The textual topic relates to technology, which aligns with the detected visual content."
242
  )
243
 
 
205
 
206
  if text_label:
207
  reasoning_lines.append(
208
+ f"<b style='color:#60a5fa;'>๐Ÿ“ Text Analysis:</b> "
209
  f"The text expresses a {text_label.lower()} sentiment with emotion "
210
  f"'{emotion_label}'. The topic appears related to {topic_label}."
211
  )
212
  # ================= IMAGE REASONING =================
213
  if image_label:
214
  reasoning_lines.append(
215
+ f"<b style='color:#22c55e;'>๐Ÿ–ผ Image Analysis:</b> "
216
+ f"Classifier predicted '{image_label}' ({image_conf}% confidence), "
217
  "though this may be an approximate category."
218
  )
219
  if caption:
220
  reasoning_lines.append(
221
+ f"<b style='color:#a78bfa;'>๐Ÿ“ท Scene Description:</b> "
222
+ f"'{caption}', providing a clearer interpretation of the image."
223
  )
224
 
225
  if audio_label:
226
  reasoning_lines.append(
227
+ f"<b style='color:#f59e0b;'>๐ŸŽ™ Audio Tone:</b> "
228
  f"Spoken content carries a {audio_label.lower()} tone ({audio_conf}%)."
229
  )
230
  if text_label and audio_label:
231
  if text_label == "POSITIVE" and audio_label == "NEGATIVE":
232
  reasoning_lines.append(
233
+ "<b style='color:#ef4444;'>โš ๏ธ Cross-Modal Conflict:</b> "
234
+ " the text expresses positivity "
235
  "but the voice tone suggests negativity."
236
  )
237
  if text_label == "NEGATIVE" and audio_label == "POSITIVE":
238
+ reasoning_lines.append(
239
+ "<b style='color:#ef4444;'>โš  Cross-Modal Conflict:</b> "
240
+ "Text expresses negativity while the voice tone appears positive."
241
+ )
242
  if image_label and topic_label:
243
  if topic_label == "technology":
244
  reasoning_lines.append(
245
+ "<b style='color:#ef4444;'>๐Ÿ’ป๐Ÿค– Technology:</b> "
246
  "The textual topic relates to technology, which aligns with the detected visual content."
247
  )
248