Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -142,14 +142,14 @@ def main():
|
|
142 |
rouge = Rouge()
|
143 |
scores = rouge.get_scores(st.session_state.summary, reference_summary)
|
144 |
|
145 |
-
|
146 |
col1, col2, col3 = st.columns(3)
|
147 |
with col1:
|
148 |
-
st.markdown(f"<p style='color: black; border: 1px solid #cccccc; padding: 5px; border-radius: 4px;'>ROUGE-1: {scores[0]['rouge-1']['f']:.4f}</p>", unsafe_allow_html=True)
|
149 |
with col2:
|
150 |
-
st.markdown(f"<p style='color: black; border: 1px solid #cccccc; padding: 5px; border-radius: 4px;'>ROUGE-2: {scores[0]['rouge-2']['f']:.4f}</p>", unsafe_allow_html=True)
|
151 |
with col3:
|
152 |
-
st.markdown(f"<p style='color: black; border: 1px solid #cccccc; padding: 5px; border-radius: 4px;'>ROUGE-L: {scores[0]['rouge-l']['f']:.4f}</p>", unsafe_allow_html=True)
|
153 |
|
154 |
if __name__ == "__main__":
|
155 |
main()
|
|
|
142 |
rouge = Rouge()
|
143 |
scores = rouge.get_scores(st.session_state.summary, reference_summary)
|
144 |
|
145 |
+
# Display ROUGE scores as styled text
|
146 |
col1, col2, col3 = st.columns(3)
|
147 |
with col1:
|
148 |
+
st.markdown(f"<p style='text-align: center; color: black; border: 1px solid #cccccc; padding: 5px; border-radius: 4px;'>ROUGE-1: {scores[0]['rouge-1']['f']:.4f}</p>", unsafe_allow_html=True)
|
149 |
with col2:
|
150 |
+
st.markdown(f"<p style='text-align: center; color: black; border: 1px solid #cccccc; padding: 5px; border-radius: 4px;'>ROUGE-2: {scores[0]['rouge-2']['f']:.4f}</p>", unsafe_allow_html=True)
|
151 |
with col3:
|
152 |
+
st.markdown(f"<p style='text-align: center; color: black; border: 1px solid #cccccc; padding: 5px; border-radius: 4px;'>ROUGE-L: {scores[0]['rouge-l']['f']:.4f}</p>", unsafe_allow_html=True)
|
153 |
|
154 |
if __name__ == "__main__":
|
155 |
main()
|