Ricercar commited on
Commit
d46131f
·
1 Parent(s): 3115330

change checkbox to toggle

Browse files
Files changed (2) hide show
  1. Home.py +1 -1
  2. pages/Summary.py +7 -7
Home.py CHANGED
@@ -18,7 +18,7 @@ def login():
18
  )
19
  st.write('You can leave it blank to be anonymous.')
20
 
21
- st.session_state.show_NSFW = st.checkbox(':orange[show potentially mature content]', help='Inevitably, a few images might be NSFW, even if we tried to elimiate NFSW content in our prompts. We calculate a NSFW score to filter them out. Please check only if you are 18+ and want to take a look at the whole GEMRec-18k dataset', value=False, key='mature_content')
22
 
23
  # Every form must have a submit button.
24
  submitted = st.form_submit_button("Start")
 
18
  )
19
  st.write('You can leave it blank to be anonymous.')
20
 
21
+ st.session_state.show_NSFW = st.toggle(':orange[show potentially mature content]', help='Inevitably, a few images might be NSFW, even if we tried to elimiate NFSW content in our prompts. We calculate a NSFW score to filter them out. Please check only if you are 18+ and want to take a look at the whole GEMRec-18k dataset', value=False, key='mature_content')
22
 
23
  # Every form must have a submit button.
24
  submitted = st.form_submit_button("Start")
pages/Summary.py CHANGED
@@ -36,11 +36,11 @@ class DashboardApp:
36
  if back_to_ranking:
37
  switch_page('ranking')
38
 
39
- with st.form('overall_feedback'):
40
- feedback = st.text_area('Please leave your comments here.', key='comment')
41
- submit_feedback = st.form_submit_button('Submit Feedback')
42
- if submit_feedback:
43
- print(feedback)
44
 
45
  return tag
46
 
@@ -137,7 +137,7 @@ class DashboardApp:
137
  with st.expander(f'Show Images'):
138
  images = self.promptBook[self.promptBook['modelVersion_id'] == modelVersion_id]['image_id'].values
139
 
140
- safety_check = st.checkbox('Include potentially unsafe or offensive images', value=False, key=modelVersion_id)
141
  unsafe_prompts = json.load(open('data/unsafe_prompts.json', 'r'))
142
  # merge dict values into one list
143
  unsafe_prompts = [item for sublist in unsafe_prompts.values() for item in sublist]
@@ -205,7 +205,7 @@ class DashboardApp:
205
  tag = self.sidebar(tags, mode)
206
  self.leaderboard(tag, db_table)
207
 
208
- # st.chat_input('Please leave your comments here.', key='comment')
209
 
210
 
211
  if __name__ == "__main__":
 
36
  if back_to_ranking:
37
  switch_page('ranking')
38
 
39
+ # with st.form('overall_feedback'):
40
+ # feedback = st.text_area('Please leave your comments here.', key='comment')
41
+ # submit_feedback = st.form_submit_button('Submit Feedback')
42
+ # if submit_feedback:
43
+ # print(feedback)
44
 
45
  return tag
46
 
 
137
  with st.expander(f'Show Images'):
138
  images = self.promptBook[self.promptBook['modelVersion_id'] == modelVersion_id]['image_id'].values
139
 
140
+ safety_check = st.toggle('Include potentially unsafe or offensive images', value=False, key=modelVersion_id)
141
  unsafe_prompts = json.load(open('data/unsafe_prompts.json', 'r'))
142
  # merge dict values into one list
143
  unsafe_prompts = [item for sublist in unsafe_prompts.values() for item in sublist]
 
205
  tag = self.sidebar(tags, mode)
206
  self.leaderboard(tag, db_table)
207
 
208
+ st.chat_input('Please leave your comments here.', key='comment')
209
 
210
 
211
  if __name__ == "__main__":