Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -179,19 +179,29 @@ def analyze_with_progress(text):
|
|
| 179 |
elif update["status"] == "processing":
|
| 180 |
yield f"⏳ {update['progress']}\n\nCompleted: {', '.join(update['completed']) or 'None'}"
|
| 181 |
elif update["status"] == "partial_result":
|
| 182 |
-
yield
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
elif update["status"] == "complete":
|
| 188 |
final = update["final"]
|
| 189 |
-
yield
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
# Gradio Interface with Streaming
|
| 197 |
iface = gr.Interface(
|
|
|
|
| 179 |
elif update["status"] == "processing":
|
| 180 |
yield f"⏳ {update['progress']}\n\nCompleted: {', '.join(update['completed']) or 'None'}"
|
| 181 |
elif update["status"] == "partial_result":
|
| 182 |
+
yield "\n".join([
|
| 183 |
+
f"✅ {update['progress']}",
|
| 184 |
+
"",
|
| 185 |
+
f"Verdict: {update['result']['verdict']}",
|
| 186 |
+
f"Confidence: {update['result']['confidence']}",
|
| 187 |
+
"Evidence:",
|
| 188 |
+
*[f"- {e}" for e in update['result']['evidence']],
|
| 189 |
+
"",
|
| 190 |
+
f"Completed: {', '.join(update['completed'])}"
|
| 191 |
+
])
|
| 192 |
elif update["status"] == "complete":
|
| 193 |
final = update["final"]
|
| 194 |
+
yield "\n".join([
|
| 195 |
+
f"🎯 Final Verdict: {final['verdict']}",
|
| 196 |
+
f"🔐 Confidence: {final['confidence']}",
|
| 197 |
+
"",
|
| 198 |
+
"Key Reasons:",
|
| 199 |
+
*[f"- {e}" for e in final['evidence']],
|
| 200 |
+
"",
|
| 201 |
+
"=== Full Results ===",
|
| 202 |
+
*[f"{agent}:\nVerdict: {res['verdict']}\nConfidence: {res['confidence']}"
|
| 203 |
+
for agent, res in update['results'].items()]
|
| 204 |
+
])
|
| 205 |
|
| 206 |
# Gradio Interface with Streaming
|
| 207 |
iface = gr.Interface(
|