Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
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": "
|
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",
|