Zekun Wu
commited on
Commit
•
be02b8f
1
Parent(s):
4a24dd6
update
Browse files
pages/5_Conversation_Evaluation.py
CHANGED
@@ -90,7 +90,10 @@ else:
|
|
90 |
|
91 |
st.write('### Conversation')
|
92 |
if conversation:
|
93 |
-
|
|
|
|
|
|
|
94 |
else:
|
95 |
st.write('No conversation entered yet.')
|
96 |
|
@@ -105,7 +108,7 @@ else:
|
|
105 |
eval = evaluator(model_name)
|
106 |
scores = eval.evaluate_conversation(conversation, context)
|
107 |
st.write('### Scores')
|
108 |
-
details = write_evaluation_commentary(scores)
|
109 |
df = pd.DataFrame(details)
|
110 |
st.write(df)
|
111 |
|
|
|
90 |
|
91 |
st.write('### Conversation')
|
92 |
if conversation:
|
93 |
+
for exchange in conversation:
|
94 |
+
role = exchange['role'].capitalize()
|
95 |
+
content = exchange['content']
|
96 |
+
st.markdown(f"**{role}:** {content}")
|
97 |
else:
|
98 |
st.write('No conversation entered yet.')
|
99 |
|
|
|
108 |
eval = evaluator(model_name)
|
109 |
scores = eval.evaluate_conversation(conversation, context)
|
110 |
st.write('### Scores')
|
111 |
+
details = write_evaluation_commentary(scores["aggregate_scores"])
|
112 |
df = pd.DataFrame(details)
|
113 |
st.write(df)
|
114 |
|