Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -142,19 +142,10 @@ def main():
|
|
142 |
rouge = Rouge()
|
143 |
scores = rouge.get_scores(st.session_state.summary, reference_summary)
|
144 |
|
145 |
-
|
146 |
# Using st.markdown with HTML and inline CSS to create a box around the content
|
147 |
-
st.
|
148 |
-
|
149 |
-
|
150 |
-
<h4 style="color: #2678bf;">ROUGE Scores:</h4>
|
151 |
-
<p>ROUGE-1: {rouge_1:.4f}</p>
|
152 |
-
<p>ROUGE-2: {rouge_2:.4f}</p>
|
153 |
-
<p>ROUGE-L: {rouge_l:.4f}</p>
|
154 |
-
</div>
|
155 |
-
""".format(rouge_1=scores[0]['rouge-1']['f'], rouge_2=scores[0]['rouge-2']['f'], rouge_l=scores[0]['rouge-l']['f']),
|
156 |
-
unsafe_allow_html=True
|
157 |
-
)
|
158 |
|
159 |
if __name__ == "__main__":
|
160 |
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()
|