Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,6 +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 |
quality_labels = ['very poor', 'poor', 'acceptable', 'good', 'very good']
|
| 51 |
priority_labels = ['not a priority', 'low priority', 'neutral', 'moderate priority', 'high priority']
|
| 52 |
yes_no_labels = ['no','yes']
|
|
@@ -117,18 +118,18 @@ Please indicate, in the box below, that you are at least 18 years old, have read
|
|
| 117 |
|
| 118 |
fields: List[Field] = [
|
| 119 |
Field(name="patient", type="input_col", title=" "),
|
| 120 |
-
Field(type="expander", title="
|
| 121 |
Field(name="dialogue_name", type="input_col", title=""),
|
| 122 |
]),
|
| 123 |
|
| 124 |
-
Field(type="container", title="
|
| 125 |
Field(name="to_moderate", type="y_n_radio",
|
| 126 |
-
title="Explicit mention of clinical diagnosis?", mandatory=True),
|
| 127 |
Field(name="priority_level", type="likert_radio",
|
| 128 |
title="Level of priority", other_params={'labels': priority_labels}, mandatory=True),
|
| 129 |
]),
|
| 130 |
|
| 131 |
-
Field(type="container", title=
|
| 132 |
Field(name="rupture_markers", type="rupture_markers",
|
| 133 |
title="Select rupture markers noted in the session, include line numbers where rupture is found.", mandatory=False),
|
| 134 |
# Field(name="rupture_marker", type="multiselect",
|
|
@@ -447,7 +448,7 @@ def show_field(f: Field, index: int, data_collected):
|
|
| 447 |
#display_dialogue(os.path.join(input_repo_path, 'dialogues', value))
|
| 448 |
render_dialogue(os.path.join(input_repo_path, 'dialogues', value), width_chars=115, height_px=520, show_border=False)
|
| 449 |
elif f.name == 'patient':
|
| 450 |
-
st.markdown(f"##
|
| 451 |
else:
|
| 452 |
st.write(value)
|
| 453 |
case 'markdown':
|
|
|
|
| 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']
|
|
|
|
| 118 |
|
| 119 |
fields: List[Field] = [
|
| 120 |
Field(name="patient", type="input_col", title=" "),
|
| 121 |
+
Field(type="expander", title="## Session Transcription: *(expand)*", children=[
|
| 122 |
Field(name="dialogue_name", type="input_col", title=""),
|
| 123 |
]),
|
| 124 |
|
| 125 |
+
Field(type="container", title="## Session-/Patient-Specific Properties", children=[
|
| 126 |
Field(name="to_moderate", type="y_n_radio",
|
| 127 |
+
title="Explicit mention of clinical diagnosis?", other_params={'labels': mentioned_y_n}, mandatory=True),
|
| 128 |
Field(name="priority_level", type="likert_radio",
|
| 129 |
title="Level of priority", other_params={'labels': priority_labels}, mandatory=True),
|
| 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",
|
|
|
|
| 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:
|
| 453 |
st.write(value)
|
| 454 |
case 'markdown':
|