emvecchi commited on
Commit
65944da
·
verified ·
1 Parent(s): 678ddd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -47,7 +47,7 @@ to_annotate_file_name = 'to_annotate.csv' # CSV file to annotate
47
  COLS_TO_SAVE = ['dialogue_id','dialogue_name','generatedPatient']
48
 
49
  agreement_labels = ['strongly disagree', 'disagree', 'neither agree no disagree', 'agree', 'strongly agree']
50
- mentioned_y_n = ['yes, explicitly', 'yes, implicitly', 'no', 'not sure']
51
  quality_labels = ['very poor', 'poor', 'acceptable', 'good', 'very good']
52
  priority_labels = ['not a priority', 'low priority', 'neutral', 'moderate priority', 'high priority']
53
  yes_no_labels = ['no','yes']
@@ -130,6 +130,9 @@ fields: List[Field] = [
130
  ]),
131
 
132
  Field(type="container", title="### Rupture Markers", children=[
 
 
 
133
  Field(name="rupture_markers", type="rupture_markers",
134
  title="Select rupture markers noted in the session, include line numbers where rupture is found.", mandatory=False),
135
  # Field(name="rupture_marker", type="multiselect",
@@ -276,7 +279,7 @@ def md_dialogue_to_visual_lines(md_text: str, width: int) -> list[str]:
276
  return out
277
 
278
  def render_dialogue(md_path: str,
279
- width_chars: int = 80,
280
  height_px: int = 520,
281
  font_family: str = "system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Noto Sans', sans-serif",
282
  font_size: str = "1.05rem",
@@ -447,6 +450,8 @@ def show_field(f: Field, index: int, data_collected):
447
  elif f.name == 'dialogue_name':
448
  #display_dialogue(os.path.join(input_repo_path, 'dialogues', value))
449
  render_dialogue(os.path.join(input_repo_path, 'dialogues', value), width_chars=115, height_px=520, show_border=False)
 
 
450
  elif f.name == 'patient':
451
  st.markdown(f"## Patient:  {value}")
452
  else:
 
47
  COLS_TO_SAVE = ['dialogue_id','dialogue_name','generatedPatient']
48
 
49
  agreement_labels = ['strongly disagree', 'disagree', 'neither agree no disagree', 'agree', 'strongly agree']
50
+ mentioned_y_n = ['yes, explicitly', 'yes, implicitly', 'no', 'not sure', 'other']
51
  quality_labels = ['very poor', 'poor', 'acceptable', 'good', 'very good']
52
  priority_labels = ['not a priority', 'low priority', 'neutral', 'moderate priority', 'high priority']
53
  yes_no_labels = ['no','yes']
 
130
  ]),
131
 
132
  Field(type="container", title="### Rupture Markers", children=[
133
+ Field(type="expander", title="**Overview of rupture markers** *(expand)*", children=[
134
+ Field(name="rupture_marker_overview", type="input_col", title=""),
135
+ ]),
136
  Field(name="rupture_markers", type="rupture_markers",
137
  title="Select rupture markers noted in the session, include line numbers where rupture is found.", mandatory=False),
138
  # Field(name="rupture_marker", type="multiselect",
 
279
  return out
280
 
281
  def render_dialogue(md_path: str,
282
+ width_chars: int = 100,
283
  height_px: int = 520,
284
  font_family: str = "system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Noto Sans', sans-serif",
285
  font_size: str = "1.05rem",
 
450
  elif f.name == 'dialogue_name':
451
  #display_dialogue(os.path.join(input_repo_path, 'dialogues', value))
452
  render_dialogue(os.path.join(input_repo_path, 'dialogues', value), width_chars=115, height_px=520, show_border=False)
453
+ elif f.name == 'rupture_marker_overview':
454
+ display_dialogue(os.path.join(input_repo_path, 'rupture_marker_overview.md'))
455
  elif f.name == 'patient':
456
  st.markdown(f"## Patient:  {value}")
457
  else: