OzoneAsai commited on
Commit
f0fab5f
β€’
1 Parent(s): 3e96cd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -48,7 +48,7 @@ def blur_nsfw_photo(photo_path, apply_blur=True):
48
  nsfw_score = result[0]['score']
49
  if result[0]['label'] == 'nsfw' and nsfw_score >= 0.7 and apply_blur:
50
  # γ‚¬γ‚¦γ‚·γ‚’γƒ³γƒ–γƒ©γƒΌγ‚’η”¨γ„γ¦γƒ–γƒ©γƒΌγ‚’εΌ·εŒ–
51
- blurred_img = img.filter(ImageFilter.GaussianBlur(radius=5))
52
  blurred_path = os.path.join("photos", "blurred_" + os.path.basename(photo_path))
53
  blurred_img.save(blurred_path)
54
  return blurred_path
@@ -116,9 +116,7 @@ def main():
116
  end_idx = min(start_idx + PAGE_SIZE, len(index_df))
117
  current_page = index_df[start_idx:end_idx]
118
 
119
- #
120
-
121
- δΈ¦γ³ζ›Ώγˆ
122
  sort_options = ["TimeStamp ζ˜‡ι †", "TimeStamp 降順", "名前 ζ˜‡ι †", "名前 降順"]
123
  selected_sort = st.sidebar.selectbox("δΈ¦γ³ζ›Ώγˆ", sort_options)
124
 
@@ -139,4 +137,4 @@ def main():
139
  download_photos_as_zip(file_paths)
140
 
141
  if __name__ == "__main__":
142
- main()
 
48
  nsfw_score = result[0]['score']
49
  if result[0]['label'] == 'nsfw' and nsfw_score >= 0.7 and apply_blur:
50
  # γ‚¬γ‚¦γ‚·γ‚’γƒ³γƒ–γƒ©γƒΌγ‚’η”¨γ„γ¦γƒ–γƒ©γƒΌγ‚’εΌ·εŒ–
51
+ blurred_img = img.filter(ImageFilter.GaussianBlur(radius=10))
52
  blurred_path = os.path.join("photos", "blurred_" + os.path.basename(photo_path))
53
  blurred_img.save(blurred_path)
54
  return blurred_path
 
116
  end_idx = min(start_idx + PAGE_SIZE, len(index_df))
117
  current_page = index_df[start_idx:end_idx]
118
 
119
+ # δΈ¦γ³ζ›Ώγˆ
 
 
120
  sort_options = ["TimeStamp ζ˜‡ι †", "TimeStamp 降順", "名前 ζ˜‡ι †", "名前 降順"]
121
  selected_sort = st.sidebar.selectbox("δΈ¦γ³ζ›Ώγˆ", sort_options)
122
 
 
137
  download_photos_as_zip(file_paths)
138
 
139
  if __name__ == "__main__":
140
+ main()