emvecchi commited on
Commit
5e721ae
1 Parent(s): be58add

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -38,12 +38,12 @@ fields: List[Field] = [
38
  Field(name="comment", type="input_col", title="**Comment:**"),
39
  Field(name="image_name", type="input_col", title="**Visualization of high contributing properties:**"),
40
 
41
- #Field(type="container", title="", children=[
42
- # Field(name="to_moderate", type="radio",
43
- # title="**Moderator Intervention**: Do feel this comment/discussion would benefit from moderator intervention?"),
44
- # Field(name="actions_clear", type="slider",
45
- # title="**Priority**: With what level of priority would you need to interact with this comment?"),
46
- #]),
47
  #Field(type="expander",
48
  # title="Expand and fill-out this section if you see **issues in the original comment**",
49
  # children=[
@@ -70,8 +70,6 @@ fields: List[Field] = [
70
  # help="Welcoming, encouraging and acknowledging. Avoid Evaluative and/or Condescending Responses"),
71
  #]),
72
  #
73
- Field(name="to_moderate", type="text",
74
- title="**Moderator Intervention**: Do feel this comment/discussion would benefit from moderator intervention?"),
75
  Field(name="other_comments", type="text", title="Further comments: free text"),
76
  ]
77
  INPUT_FIELD_DEFAULT_VALUES = {'slider': 4,
@@ -156,6 +154,11 @@ def show_field(f: Field, index: int):
156
  st.session_state.data_inputs[f.name] = st.checkbox(f.title,
157
  key=key,
158
  value=value, help=f.help)
 
 
 
 
 
159
  case 'slider':
160
  st.session_state.data_inputs[f.name] = st.slider(f.title,
161
  min_value=1, max_value=7, step=1,
 
38
  Field(name="comment", type="input_col", title="**Comment:**"),
39
  Field(name="image_name", type="input_col", title="**Visualization of high contributing properties:**"),
40
 
41
+ Field(type="container", title="", children=[
42
+ Field(name="to_moderate", type="radio",
43
+ title="**Moderator Intervention**: Do feel this comment/discussion would benefit from moderator intervention?"),
44
+ Field(name="actions_clear", type="slider",
45
+ title="**Priority**: With what level of priority would you need to interact with this comment?"),
46
+ ]),
47
  #Field(type="expander",
48
  # title="Expand and fill-out this section if you see **issues in the original comment**",
49
  # children=[
 
70
  # help="Welcoming, encouraging and acknowledging. Avoid Evaluative and/or Condescending Responses"),
71
  #]),
72
  #
 
 
73
  Field(name="other_comments", type="text", title="Further comments: free text"),
74
  ]
75
  INPUT_FIELD_DEFAULT_VALUES = {'slider': 4,
 
154
  st.session_state.data_inputs[f.name] = st.checkbox(f.title,
155
  key=key,
156
  value=value, help=f.help)
157
+ case 'radio':
158
+ st.session_state.data_inputs[f.name] = st.radio(f.title,
159
+ ["yes","no","other"],
160
+ key=key,
161
+ value=value, help=f.help)
162
  case 'slider':
163
  st.session_state.data_inputs[f.name] = st.slider(f.title,
164
  min_value=1, max_value=7, step=1,