Vrda commited on
Commit
3053868
·
verified ·
1 Parent(s): f008201

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -535,6 +535,13 @@ if has_any_result:
535
 
536
  VALIDITY_OPTIONS = ["Valid", "Partially Valid", "Invalid"]
537
  RATING_OPTIONS = ["1 - Poor", "2 - Fair", "3 - Good", "4 - Very Good", "5 - Excellent"]
 
 
 
 
 
 
 
538
 
539
  feedback_data = {}
540
 
@@ -590,16 +597,21 @@ if has_any_result:
590
  )
591
  safety_severity = st.select_slider(
592
  f"**Safety concern severity** (1=no concern, 5=critical risk):",
593
- options=RATING_OPTIONS,
594
- value="1 - Poor",
595
  key=f"{model_key}_safety",
596
  )
 
 
 
 
597
 
598
  feedback_data[model_key] = {
599
  "errors": error_ratings,
600
  "suggestions_useful": suggestions_useful,
601
  "overall_usefulness": overall_usefulness,
602
  "safety_concern_severity": safety_severity,
 
603
  }
604
 
605
  st.markdown("---")
 
535
 
536
  VALIDITY_OPTIONS = ["Valid", "Partially Valid", "Invalid"]
537
  RATING_OPTIONS = ["1 - Poor", "2 - Fair", "3 - Good", "4 - Very Good", "5 - Excellent"]
538
+ SAFETY_OPTIONS = [
539
+ "1 - No concern",
540
+ "2 - Mild concern",
541
+ "3 - Moderate concern",
542
+ "4 - Serious concern",
543
+ "5 - Critical risk",
544
+ ]
545
 
546
  feedback_data = {}
547
 
 
597
  )
598
  safety_severity = st.select_slider(
599
  f"**Safety concern severity** (1=no concern, 5=critical risk):",
600
+ options=SAFETY_OPTIONS,
601
+ value="1 - No concern",
602
  key=f"{model_key}_safety",
603
  )
604
+ st.caption(
605
+ "Use this as a risk scale: 1 means no safety concern, 5 means critical patient risk."
606
+ )
607
+ safety_score = int(safety_severity.split(" - ", 1)[0])
608
 
609
  feedback_data[model_key] = {
610
  "errors": error_ratings,
611
  "suggestions_useful": suggestions_useful,
612
  "overall_usefulness": overall_usefulness,
613
  "safety_concern_severity": safety_severity,
614
+ "safety_concern_score": safety_score,
615
  }
616
 
617
  st.markdown("---")