Update app.py
Browse files
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=
|
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()
|