Ricercar commited on
Commit
549b34c
1 Parent(s): 8c6e824

turn off summary safety check

Browse files
Files changed (1) hide show
  1. pages/Summary.py +9 -9
pages/Summary.py CHANGED
@@ -151,15 +151,15 @@ class DashboardApp:
151
  # with st.expander(f'Show Images'):
152
  images = self.promptBook[self.promptBook['modelVersion_id'] == modelVersion_id]['image_id'].values
153
 
154
- safety_check = st.toggle('Include potentially unsafe or offensive images', value=False, key=modelVersion_id)
155
- unsafe_prompts = json.load(open('data/unsafe_prompts.json', 'r'))
156
- # merge dict values into one list
157
- unsafe_prompts = [item for sublist in unsafe_prompts.values() for item in sublist]
158
- unsafe_images = self.promptBook[self.promptBook['prompt_id'].isin(unsafe_prompts)]['image_id'].values
159
-
160
- if not safety_check:
161
- # exclude unsafe prompts from images
162
- images = [image for image in images if image not in unsafe_images]
163
 
164
  images = [f"https://modelcofferbucket.s3-accelerate.amazonaws.com/{image}.png" for image in images]
165
  clickable_images(
 
151
  # with st.expander(f'Show Images'):
152
  images = self.promptBook[self.promptBook['modelVersion_id'] == modelVersion_id]['image_id'].values
153
 
154
+ # safety_check = st.toggle('Include potentially unsafe or offensive images', value=False, key=modelVersion_id)
155
+ # unsafe_prompts = json.load(open('data/unsafe_prompts.json', 'r'))
156
+ # # merge dict values into one list
157
+ # unsafe_prompts = [item for sublist in unsafe_prompts.values() for item in sublist]
158
+ # unsafe_images = self.promptBook[self.promptBook['prompt_id'].isin(unsafe_prompts)]['image_id'].values
159
+ #
160
+ # if not safety_check:
161
+ # # exclude unsafe prompts from images
162
+ # images = [image for image in images if image not in unsafe_images]
163
 
164
  images = [f"https://modelcofferbucket.s3-accelerate.amazonaws.com/{image}.png" for image in images]
165
  clickable_images(