OriLib commited on
Commit
075bcca
·
verified ·
1 Parent(s): 4cb6ad2

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app.py +1 -8
  2. requirements.txt +1 -1
app.py CHANGED
@@ -17,16 +17,9 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
17
  pipe.to(device)
18
  print(f"Model loaded on {device}")
19
 
20
- def process_image(image, mask, instruction, num_steps, guidance_scale):
21
  """
22
  Process an image with RMBG-3.0
23
-
24
- Args:
25
- image: Input image (PIL Image)
26
- mask: Optional mask image (PIL Image)
27
- instruction: Text instruction for editing
28
- num_steps: Number of inference steps
29
- guidance_scale: Guidance scale for generation
30
  """
31
  if image is None:
32
  return None, "Please upload an image"
 
17
  pipe.to(device)
18
  print(f"Model loaded on {device}")
19
 
20
+ def process_image(image, mask, instruction, num_steps=50, guidance_scale=5.0):
21
  """
22
  Process an image with RMBG-3.0
 
 
 
 
 
 
 
23
  """
24
  if image is None:
25
  return None, "Please upload an image"
requirements.txt CHANGED
@@ -5,4 +5,4 @@ accelerate>=0.30.0
5
  safetensors>=0.4.0
6
  pillow>=10.0.0
7
  huggingface_hub>=0.34.0
8
- gradio>=5.0.0
 
5
  safetensors>=0.4.0
6
  pillow>=10.0.0
7
  huggingface_hub>=0.34.0
8
+ gradio==5.7.1