EE21 commited on
Commit
6a4b9ce
1 Parent(s): e3e6465

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -142,10 +142,14 @@ def main():
142
  rouge = Rouge()
143
  scores = rouge.get_scores(st.session_state.summary, reference_summary)
144
 
145
- # Using st.markdown with HTML and inline CSS to create a box around the content
146
- st.button(f"ROUGE-1: {scores[0]['rouge-1']['f']:.4f}", disabled=True)
147
- st.button(f"ROUGE-2: {scores[0]['rouge-2']['f']:.4f}", disabled=True)
148
- st.button(f"ROUGE-L: {scores[0]['rouge-l']['f']:.4f}", disabled=True)
 
 
 
 
149
 
150
  if __name__ == "__main__":
151
  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='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()