Spaces:
Sleeping
Sleeping
Refactor debug information in analyze_with_persona function to improve output format
Browse files
app.py
CHANGED
|
@@ -113,8 +113,8 @@ def analyze_with_persona(statement, persona=""):
|
|
| 113 |
prob_text += f"\nLogit probabilities outside of 1-5: {outside_probabability}"
|
| 114 |
|
| 115 |
# Show what the model actually generated including input and special tokens
|
| 116 |
-
debug_info = f"
|
| 117 |
-
return fig, prob_text, f"
|
| 118 |
|
| 119 |
else:
|
| 120 |
return None, "", "❌ No scores generated"
|
|
|
|
| 113 |
prob_text += f"\nLogit probabilities outside of 1-5: {outside_probabability}"
|
| 114 |
|
| 115 |
# Show what the model actually generated including input and special tokens
|
| 116 |
+
debug_info = f"\n{tokenizer.decode(outputs.sequences[0], skip_special_tokens=False)}"
|
| 117 |
+
return fig, prob_text, f"{debug_info}"
|
| 118 |
|
| 119 |
else:
|
| 120 |
return None, "", "❌ No scores generated"
|