gchallar commited on
Commit
97926fb
·
verified ·
1 Parent(s): f005457

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -93,8 +93,8 @@ def apply_depth_based_blur_background(image, mask, strength):
93
 
94
  def segment_and_blur(input_image, blur_type, gaussian_radius=15, lens_strength=5):
95
  try:
96
- if oneformer_processor is None or oneformer_model is None:
97
- return "Error: OneFormer model not loaded."
98
 
99
  image = input_image.convert("RGB")
100
  image = image.rotate(-90, expand=True)
 
93
 
94
  def segment_and_blur(input_image, blur_type, gaussian_radius=15, lens_strength=5):
95
  try:
96
+ if oneformer_processor is None or oneformer_model is None:
97
+ raise RuntimeError("OneFormer model not loaded.")
98
 
99
  image = input_image.convert("RGB")
100
  image = image.rotate(-90, expand=True)