Athspi commited on
Commit
d955cbb
·
verified ·
1 Parent(s): c140ae2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,7 +46,7 @@ def process_image():
46
 
47
  # Configure model with safety settings
48
  model = genai.GenerativeModel('gemini-2.0-flash-exp-image-generation')
49
- prompt = f"Remove {object_type} from image naturally without text or artifacts"
50
 
51
  response = model.generate_content(
52
  [prompt, genai.upload_file(input_path)],
@@ -57,7 +57,7 @@ def process_image():
57
  "max_output_tokens": 4096,
58
  },
59
  safety_settings={
60
- "HARM_CATEGORY_CIVIC_INTEGRITY": "BLOCK_ONLY_HIGH",
61
  "HARM_CATEGORY_HARASSMENT": "BLOCK_NONE",
62
  "HARM_CATEGORY_HATE_SPEECH": "BLOCK_NONE",
63
  "HARM_CATEGORY_SEXUALLY_EXPLICIT": "BLOCK_NONE",
 
46
 
47
  # Configure model with safety settings
48
  model = genai.GenerativeModel('gemini-2.0-flash-exp-image-generation')
49
+ prompt = f"Remove {object_type} from image"
50
 
51
  response = model.generate_content(
52
  [prompt, genai.upload_file(input_path)],
 
57
  "max_output_tokens": 4096,
58
  },
59
  safety_settings={
60
+ "HARM_CATEGORY_CIVIC_INTEGRITY": "BLOCK_NONE",
61
  "HARM_CATEGORY_HARASSMENT": "BLOCK_NONE",
62
  "HARM_CATEGORY_HATE_SPEECH": "BLOCK_NONE",
63
  "HARM_CATEGORY_SEXUALLY_EXPLICIT": "BLOCK_NONE",