emvecchi commited on
Commit
2857b09
1 Parent(s): effd9e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -146,35 +146,37 @@ fields: List[Field] = [
146
 
147
  Field(type="container", title="**Need for Moderation**", children=[
148
  Field(name="to_moderate", type="radio",
149
- title="Do feel this comment/discussion would benefit from moderator intervention?"),
150
  Field(name="actions_clear", type="select_slider",
151
- title="With what level of **priority** would you need to interact with this comment?", other_params={'labels': priority_labels}),
 
152
  ]),
153
 
154
  Field(type="container", title="**Moderation Function**", children=[
155
  Field(name="mod_function", type="multiselect",
156
- title="What type of moderation function is needed here? *(Multiple selection possible)*"),
157
- Field(name="mod_function_other", type="text", title="*If Other, please specify:*"),
 
158
  ]),
159
 
160
  Field(type="container", title="**Contributing properties**", children=[
161
  Field(name="relevant_properties", type="multiselect",
162
  title="Which property(s) is most impactful in your assessment? *(Multiple selection possible)*",
163
- other_params={'choices': property_choices}),
164
- Field(name="relevant_properties_other", type="text", title="*If Other, please specify:*"),
165
  ]),
166
 
167
  Field(type="container", title="**Moderator Assistance**", children=[
168
  Field(name="helpful", type="radio",
169
- title="If this comment/discussion was flagged to you, would it be helpful in your task of moderation?"),
170
  Field(name="mod_assistance", type="multiselect",
171
  title="If yes, please motivate the benefit it would contribute to the task. *(Multiple selection possible)*",
172
- other_params={'choices': assistance_choices}),
173
- Field(name="mod_assistance_other", type="text", title="*If Other, please specify:*"),
174
  ]),
175
 
176
  Field(type="container", title="**Other**", children=[
177
- Field(name="other_comments", type="text", title="Please provide any additional comments or information: *(optional)*"),
178
  ]),
179
  ]
180
  INPUT_FIELD_DEFAULT_VALUES = {'slider': 0,
@@ -306,7 +308,7 @@ def show_field(f: Field, index: int, data_collected):
306
  key=key,
307
  value=value, help=f.help)
308
  case 'radio':
309
- st.radio((f.title,
310
  ["not selected","yes","no","other"],
311
  key=key,
312
  help=f.help)
 
146
 
147
  Field(type="container", title="**Need for Moderation**", children=[
148
  Field(name="to_moderate", type="radio",
149
+ title="Do feel this comment/discussion would benefit from moderator intervention?", mandatory=True),
150
  Field(name="actions_clear", type="select_slider",
151
+ title="With what level of **priority** would you need to interact with this comment?", other_params={'labels': priority_labels},
152
+ mandatory=True),
153
  ]),
154
 
155
  Field(type="container", title="**Moderation Function**", children=[
156
  Field(name="mod_function", type="multiselect",
157
+ title="What type of moderation function is needed here? *(Multiple selection possible)*",
158
+ mandatory=True),
159
+ Field(name="mod_function_other", type="text", title="*If Other, please specify:*", mandatory=False),
160
  ]),
161
 
162
  Field(type="container", title="**Contributing properties**", children=[
163
  Field(name="relevant_properties", type="multiselect",
164
  title="Which property(s) is most impactful in your assessment? *(Multiple selection possible)*",
165
+ other_params={'choices': property_choices}, mandatory=True),
166
+ Field(name="relevant_properties_other", type="text", title="*If Other, please specify:*", mandatory=False),
167
  ]),
168
 
169
  Field(type="container", title="**Moderator Assistance**", children=[
170
  Field(name="helpful", type="radio",
171
+ title="If this comment/discussion was flagged to you, would it be helpful in your task of moderation?", mandatory=True),
172
  Field(name="mod_assistance", type="multiselect",
173
  title="If yes, please motivate the benefit it would contribute to the task. *(Multiple selection possible)*",
174
+ other_params={'choices': assistance_choices}, mandatory=False),
175
+ Field(name="mod_assistance_other", type="text", title="*If Other, please specify:*", mandatory=False),
176
  ]),
177
 
178
  Field(type="container", title="**Other**", children=[
179
+ Field(name="other_comments", type="text", title="Please provide any additional comments or information: *(optional)*", mandatory=False),
180
  ]),
181
  ]
182
  INPUT_FIELD_DEFAULT_VALUES = {'slider': 0,
 
308
  key=key,
309
  value=value, help=f.help)
310
  case 'radio':
311
+ st.radio(f.title,
312
  ["not selected","yes","no","other"],
313
  key=key,
314
  help=f.help)