Geek7 commited on
Commit
5b383c8
·
verified ·
1 Parent(s): 7468f56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -77,12 +77,12 @@ def generate_api():
77
  try:
78
  # Check for explicit content
79
  if is_prompt_explicit(prompt):
80
- # Return the pre-defined "nsfw.jpg" image
81
  return send_file(
82
- "nsfw.jpg",
83
- mimetype='image/png',
84
  as_attachment=False,
85
- download_name='thinkgood.png'
86
  )
87
 
88
  # Call the generate_image function with the provided parameters
 
77
  try:
78
  # Check for explicit content
79
  if is_prompt_explicit(prompt):
80
+ # Return the pre-defined "NSFW.jpg" image if the content is explicit
81
  return send_file(
82
+ "NSFW.jpg", # Make sure this file exists in your project directory
83
+ mimetype='image/jpeg',
84
  as_attachment=False,
85
+ download_name='NSFW_detected.jpg' # The name for download (optional)
86
  )
87
 
88
  # Call the generate_image function with the provided parameters