poemsforaphrodite commited on
Commit
22e1042
·
verified ·
1 Parent(s): 6b02470

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
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
- st.write(f"Our relevancy score: **{our_score:.4f}**")
 
 
 
 
 
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!")