pathananas commited on
Commit
c836c68
·
verified ·
1 Parent(s): 6b20dc5
Files changed (1) hide show
  1. model.py +4 -14
model.py CHANGED
@@ -130,7 +130,7 @@ Confidence: **{audio_conf}%**
130
  audio_result_display = f"Audio error: {str(e)}"
131
 
132
  # ================= FUSION REASONING =================
133
-
134
  reasoning_lines = []
135
 
136
  if text_label:
@@ -176,7 +176,8 @@ Confidence: **{audio_conf}%**
176
  color = "#ef4444" # RED
177
 
178
  # ================= DISPLAY SUMMARY =================
179
-
 
180
  fusion_summary = f"""
181
  <div style="padding:20px;border-radius:16px;
182
  background:linear-gradient(135deg,#0f172a,#1e293b);
@@ -219,16 +220,5 @@ border:1px solid #1f2a44;">
219
 
220
  return fusion_summary, text_result_display, image_result_display, audio_result_display
221
 
222
- # ================= SAVE HISTORY =================
223
- save_analysis({
224
- "timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
225
- "text": text,
226
- "image": image_label,
227
- "audio": audio_label,
228
- "transcription": transcription,
229
- "fusion_score": round(fusion_score,2)
230
- })
231
-
232
-
233
- return fusion_summary, text_result_display, image_result_display, audio_result_display
234
 
 
130
  audio_result_display = f"Audio error: {str(e)}"
131
 
132
  # ================= FUSION REASONING =================
133
+
134
  reasoning_lines = []
135
 
136
  if text_label:
 
176
  color = "#ef4444" # RED
177
 
178
  # ================= DISPLAY SUMMARY =================
179
+ if not reasoning_lines:
180
+ reasoning_lines.append("No multimodal signals detected from the provided inputs.")
181
  fusion_summary = f"""
182
  <div style="padding:20px;border-radius:16px;
183
  background:linear-gradient(135deg,#0f172a,#1e293b);
 
220
 
221
  return fusion_summary, text_result_display, image_result_display, audio_result_display
222
 
223
+
 
 
 
 
 
 
 
 
 
 
 
224