Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -123,23 +123,25 @@ def analyze_composite(uploaded_file, *texts):
|
|
123 |
content = raw.decode("latin-1")
|
124 |
|
125 |
r = analyze_message(content)
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
|
|
132 |
|
|
|
133 |
for idx, txt in enumerate(texts, start=1):
|
134 |
-
|
135 |
-
continue
|
136 |
-
r = analyze_message(txt)
|
137 |
outputs.append(
|
138 |
f"── Message {idx} ──\n"
|
139 |
f"Emotion Profile : {r['emotion_profile']}\n"
|
140 |
f"Active Patterns : {r['active_patterns']}\n"
|
141 |
-
|
142 |
-
|
|
|
143 |
|
144 |
return "\n".join(outputs) if outputs else "Please enter at least one message."
|
145 |
|
|
|
123 |
content = raw.decode("latin-1")
|
124 |
|
125 |
r = analyze_message(content)
|
126 |
+
# … after r = analyze_message(content) …
|
127 |
+
outputs.append(
|
128 |
+
"── Uploaded File ──\n"
|
129 |
+
f"Emotion Profile : {r['emotion_profile']}\n"
|
130 |
+
f"Active Patterns : {r['active_patterns']}\n"
|
131 |
+
- f"Emotional Tone : {tone_tag}\n"
|
132 |
+
+ f"Emotional Tone : {r['tone_tag']}\n"
|
133 |
+
)
|
134 |
|
135 |
+
# … in the loop …
|
136 |
for idx, txt in enumerate(texts, start=1):
|
137 |
+
# …
|
|
|
|
|
138 |
outputs.append(
|
139 |
f"── Message {idx} ──\n"
|
140 |
f"Emotion Profile : {r['emotion_profile']}\n"
|
141 |
f"Active Patterns : {r['active_patterns']}\n"
|
142 |
+
- f"Emotional Tone : {tone_tag}\n"
|
143 |
+
+ f"Emotional Tone : {r['tone_tag']}\n"
|
144 |
+
)
|
145 |
|
146 |
return "\n".join(outputs) if outputs else "Please enter at least one message."
|
147 |
|