emvecchi commited on
Commit
8b54a3c
·
verified ·
1 Parent(s): fe487f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -6,7 +6,7 @@ from PIL import Image
6
 
7
  import streamlit as st
8
  from markdown import markdown
9
- st.set_page_config(layout="wide", page_title="Therapy Session Annotation", initial_sidebar_state="collapsed")
10
 
11
  import re, textwrap, html as py_html
12
  from pathlib import Path
@@ -50,7 +50,7 @@ COLS_TO_SAVE = ['dialogue_id','dialogue_name','generatedPatient']
50
 
51
  agreement_labels = ['strongly disagree', 'disagree', 'neither agree no disagree', 'agree', 'strongly agree']
52
  mentioned_y_n = ['yes, explicitly', 'yes, implicitly', 'no', 'not sure', 'other']
53
- degree_labels = ['Not at all', 'Slightly', 'Moderately', 'Very much', 'Extremely']
54
  quality_labels = ['very poor', 'poor', 'acceptable', 'good', 'very good']
55
  priority_labels = ['not a priority', 'low priority', 'neutral', 'moderate priority', 'high priority']
56
  yes_no_labels = ['no','yes']
@@ -413,12 +413,6 @@ def render_rupture_markers_widget(index: int, choices: list[str]):
413
  else:
414
  default_idx = choices.index(current) if current in choices else 0
415
  st.selectbox(f"Rupture marker {i}", options=choices, key=marker_key, index=default_idx)
416
- # st.selectbox(
417
- # f"Rupture marker {i}", options=choices, key=marker_key,
418
- # index=(choices.index(st.session_state.get(marker_key))
419
- # if st.session_state.get(marker_key) in choices else 0)
420
- # if st.session_state.get(marker_key) is not None else 0
421
- # )
422
  with col2:
423
  if RUPTURE_LINE_INPUT_TYPE == "number":
424
  st.number_input("Lines: from", min_value=0, step=1, key=a_key)
@@ -817,7 +811,7 @@ def prep_and_save_data(index, skip_sample):
817
 
818
  #st.set_page_config(layout='wide')
819
  # Title of the app
820
- st.title("Therapy Session Annotation Task")
821
 
822
  st.markdown(
823
  """<style>
 
6
 
7
  import streamlit as st
8
  from markdown import markdown
9
+ st.set_page_config(layout="wide", page_title="Annotation of Simulated Patients", initial_sidebar_state="collapsed")
10
 
11
  import re, textwrap, html as py_html
12
  from pathlib import Path
 
50
 
51
  agreement_labels = ['strongly disagree', 'disagree', 'neither agree no disagree', 'agree', 'strongly agree']
52
  mentioned_y_n = ['yes, explicitly', 'yes, implicitly', 'no', 'not sure', 'other']
53
+ degree_labels = ['not at all', 'slightly', 'moderately', 'very much', 'extremely']
54
  quality_labels = ['very poor', 'poor', 'acceptable', 'good', 'very good']
55
  priority_labels = ['not a priority', 'low priority', 'neutral', 'moderate priority', 'high priority']
56
  yes_no_labels = ['no','yes']
 
413
  else:
414
  default_idx = choices.index(current) if current in choices else 0
415
  st.selectbox(f"Rupture marker {i}", options=choices, key=marker_key, index=default_idx)
 
 
 
 
 
 
416
  with col2:
417
  if RUPTURE_LINE_INPUT_TYPE == "number":
418
  st.number_input("Lines: from", min_value=0, step=1, key=a_key)
 
811
 
812
  #st.set_page_config(layout='wide')
813
  # Title of the app
814
+ st.title("Annotation of Simulated Patients")
815
 
816
  st.markdown(
817
  """<style>