Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -727,7 +727,12 @@ def show_tabular_data(df, co, country_code):
|
|
727 |
our_score = our_result['Score'].values[0]
|
728 |
|
729 |
st.write(f"Our page ranks **{our_rank}** out of **{total_results}** in terms of relevancy score.")
|
730 |
-
|
|
|
|
|
|
|
|
|
|
|
731 |
|
732 |
if our_rank == 1:
|
733 |
st.success("Your page has the highest relevancy score!")
|
|
|
727 |
our_score = our_result['Score'].values[0]
|
728 |
|
729 |
st.write(f"Our page ranks **{our_rank}** out of **{total_results}** in terms of relevancy score.")
|
730 |
+
|
731 |
+
# Update this line to handle potential string values
|
732 |
+
try:
|
733 |
+
st.write(f"Our relevancy score: **{float(our_score):.4f}**")
|
734 |
+
except ValueError:
|
735 |
+
st.write(f"Our relevancy score: **{our_score}**")
|
736 |
|
737 |
if our_rank == 1:
|
738 |
st.success("Your page has the highest relevancy score!")
|