From 1d3cd3baa62e989d4ae2ab5aef8263709d61941a Mon Sep 17 00:00:00 2001 From: ellispinsky Date: Mon, 15 Apr 2024 21:28:42 -0400 Subject: [PATCH] Update result.html with Bootstrap styling and handle unexpected result format --- web-app/templates/result.html | 64 ++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/web-app/templates/result.html b/web-app/templates/result.html index 898c2468..2ce69fac 100644 --- a/web-app/templates/result.html +++ b/web-app/templates/result.html @@ -1,34 +1,52 @@ + -

Emotion Results

- - - - - +
+

Emotion Results

+ + {% for result in results %} -
- - - - {% endfor %} -
NameEmotion Message
{{ result.name }}{{ result.emotion }}
- + {% if result.emotion is string and result.emotion.startswith('ERROR') %} + + + {% elif result.emotion is mapping %} + + + + + + + + + + {% for emotion, score in result.emotion.items() %} + + + + + {% endfor %} + +
EmotionScore (%)
{{ emotion }}{{ score | round(2) }}
+ {% else %} + + + {% endif %} + {% endfor %} + + + + + - \ No newline at end of file +